[ATK] Object attributes are missing for ARIA live region roles
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 11:52:36 +0000 (11:52 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 11:52:36 +0000 (11:52 +0000)
commita352902061a5ff4c6a3263ad92d8a2a50a0c4403
tree058e78bcaa7f9072d0be6acaacd0f01f2c6df729
parent4787e45fa4a89e63ecf717d92e11a2e2207f889f
[ATK] Object attributes are missing for ARIA live region roles
https://bugs.webkit.org/show_bug.cgi?id=171174

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the values of aria-live, aria-atomic, and aria-relevant via AtkObject
attributes on live region elements and their descendants. In order to accomplish
exposure on descendants, add AccessibilityObject::ariaLiveRegionAncestor(). Add an
optional argument, excludeIfOff, to AccessibilityObject::isInsideARIALiveRegion()
and AccessibilityObject::supportsARIALiveRegion(). This is needed because we need
to expose live region properties via ATK even in the case where the live region
is disabled/off, but supportsARIALiveRegion() deliberately checks if the live
region is enabled.

Tests: accessibility/aria-liveregion-marquee-default.html
       accessibility/aria-liveregions-attributes.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isInsideARIALiveRegion const):
(WebCore::AccessibilityObject::ariaLiveRegionAncestor const):
(WebCore::AccessibilityObject::supportsARIALiveRegion const):
* accessibility/AccessibilityObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):

Tools:

Add support for testing property values for AXARIALive, AXARIAAtomic, and
AXARIARelevant. Also add handling for testing whether AXElementBusy is
"supported" (in ATK, busy is a state and is supported on all elements
regardless of whether the state is present or absent from the state set).

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):

LayoutTests:

Move two macOS tests to the shared layout test set.

* accessibility/aria-liveregion-marquee-default-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default-expected.txt.
* accessibility/aria-liveregion-marquee-default.html: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default.html.
* accessibility/aria-liveregions-attributes-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes-expected.txt.
* accessibility/aria-liveregions-attributes.html: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes.html.
* platform/win/TestExpectations: Add the above tests to the list of known failures.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/aria-liveregion-marquee-default-expected.txt [moved from LayoutTests/accessibility/mac/aria-liveregion-marquee-default-expected.txt with 100% similarity]
LayoutTests/accessibility/aria-liveregion-marquee-default.html [moved from LayoutTests/accessibility/mac/aria-liveregion-marquee-default.html with 88% similarity]
LayoutTests/accessibility/aria-liveregions-attributes-expected.txt [moved from LayoutTests/accessibility/mac/aria-liveregions-attributes-expected.txt with 100% similarity]
LayoutTests/accessibility/aria-liveregions-attributes.html [moved from LayoutTests/accessibility/mac/aria-liveregions-attributes.html with 98% similarity]
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp