haikuwebkit/LayoutTests/accessibility/aria-switch-sends-notificat...

13 lines
284 B
Plaintext
Raw Permalink Normal View History

AX: Implement support for ARIA 1.1 'switch' role https://bugs.webkit.org/show_bug.cgi?id=141986 Reviewed by Chris Fleizach. Source/WebCore: Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a widget to accessibility APIs (supports and emits notifications when toggled, doesn't have children, exposes a name and description when provided). Tests: accessibility/aria-switch-checked.html accessibility/aria-switch-sends-notification.html accessibility/aria-switch-text.html * accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::canHaveChildren): (WebCore::AccessibilityNodeObject::isChecked): (WebCore::AccessibilityNodeObject::visibleText): (WebCore::AccessibilityNodeObject::title): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::isARIAInput): (WebCore::AccessibilityObject::actionVerb): (WebCore::initializeRoleMap): (WebCore::AccessibilityObject::supportsChecked): (WebCore::AccessibilityObject::checkboxOrRadioValue): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isSwitch): * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: (atkRole): * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]): (-[WebAccessibilityObjectWrapper accessibilityTraits]): (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]): * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (createAccessibilityRoleMap): (-[WebAccessibilityObjectWrapper subrole]): (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): LayoutTests: * accessibility/aria-switch-checked-expected.txt: Added. * accessibility/aria-switch-checked.html: Added. * accessibility/aria-switch-sends-notification-expected.txt: Added. * accessibility/aria-switch-sends-notification.html: Added. * accessibility/aria-switch-text.html: Added. * accessibility/roles-exposed.html: Added a test case for the new role. * platform/efl/accessibility/aria-fallback-roles-expected.txt: Added. * platform/efl/accessibility/aria-switch-text-expected.txt: Added. * platform/efl/accessibility/roles-exposed-expected.txt: Updated for the new role. * platform/gtk/accessibility/aria-fallback-roles-expected.txt: Added. * platform/gtk/accessibility/aria-switch-text-expected.txt: Added. * platform/gtk/accessibility/roles-exposed-expected.txt: Updated for the new role. * platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for the new role. * platform/mac/TestExpectations: Skip the 'checked' notifcation as the Mac doesn't have it. * platform/mac/accessibility/aria-switch-text-expected.txt: Added. * platform/mac/accessibility/roles-exposed-expected.txt: Updated for the new role. Canonical link: https://commits.webkit.org/160015@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-02-25 01:43:42 +00:00
Test Switch
This tests that toggling an aria switch sends a notification.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
Got notification: CheckedStateChanged
Got notification: CheckedStateChanged