haikuwebkit/LayoutTests/accessibility/aria-current-state-changed-...

20 lines
636 B
Plaintext
Raw Permalink Normal View History

Support for aria-current state changed notifications. https://bugs.webkit.org/show_bug.cgi?id=221074 Reviewed by Chris Fleizach. Source/WebCore: Test: accessibility/aria-current-state-changed-notification.html Added handling of the AXCurrentStateChanged notification for Mac and iOS ports. This notification is fired when the aria-current attribute changes. Handling of this notification is required to properly update the accessibility properties of the target object and convey them to assistive technology clients. * accessibility/AXLogger.cpp: (WebCore::operator<<): Renamed notification anumerand. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAttributeChange): * accessibility/AXObjectCache.h: * accessibility/atk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/ios/AXObjectCacheIOS.mm: (WebCore::AXObjectCache::postPlatformNotification): * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper accessibilityDOMIdentifier]): (-[WebAccessibilityObjectWrapper postCurrentStateChangedNotification]): (-[WebAccessibilityObjectWrapper accessibilityCurrentState]): (-[WebAccessibilityObjectWrapper accessibilityARIACurrentStatus]): Renamed to accessibilityCurrentState. * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postPlatformNotification): Tools: Added AccessibilityUIElement::domIdentifier and currentStateValue used in LayoutTests/accessibility/aria-current-state-changed-notification.html. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: (WTR::AccessibilityUIElement::domIdentifier const): Non-Cocoa implementation. (WTR::AccessibilityUIElement::currentStateValue const): Non-Cocoa implementation. * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElement::domIdentifier const): (WTR::AccessibilityUIElement::stringAttributeValue): (WTR::AccessibilityUIElement::currentStateValue const): * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::AccessibilityUIElement::domIdentifier const): (WTR::AccessibilityUIElement::currentStateValue const): LayoutTests: * accessibility/aria-current-state-changed-notification-expected.txt: Added. * accessibility/aria-current-state-changed-notification.html: Added. * accessibility/aria-current.html: Use AccessibilityUIElement::currentStateValue for consistency and to match closely how actual clients will invoke this functionality. * platform/gtk/TestExpectations: * platform/ios-wk1/TestExpectations: * platform/ios/TestExpectations: * platform/mac-wk1/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/233486@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-29 19:07:57 +00:00
This tests that changing the aria-current value results in a CurrentStateChanged notification.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS item2.currentStateValue is 'page'
PASS item3.currentStateValue is 'false'
Setting aria-current to false on item2.
AXCurrentStateChanged notification for item2
PASS item2.currentStateValue is 'false'
PASS item3.currentStateValue is 'false'
Setting aria-current to page on item3.
AXCurrentStateChanged notification for item3
PASS item2.currentStateValue is 'false'
PASS item3.currentStateValue is 'page'
PASS successfullyParsed is true
TEST COMPLETE