AX: [Mac] better accessibility support for Summary elements
authorn_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 22:52:17 +0000 (22:52 +0000)
committern_wang@apple.com <n_wang@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Oct 2016 22:52:17 +0000 (22:52 +0000)
commitfe7ef4aebdd1267ec12d62d6079e4bb594412f4a
treeb1681b59d333de82ffe8ff2f7865c29ae4026b5f
parenta568dc09c69c8a0290df41f816ff49fce4b12ec5
AX: [Mac] better accessibility support for Summary elements
https://bugs.webkit.org/show_bug.cgi?id=163367
<rdar://problem/28745010>

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed summary elements as AXButton and used the text node's content
as AXTitle. Also exposed the details parent's expanded status on the summary
element, so that users would see it as a collapsed/expanded button.

Changes are covered in the modified tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::parentObjectUnignored):
(WebCore::AccessibilityObject::scrollViewAncestor):
(WebCore::AccessibilityObject::headingElementForNode):
(WebCore::AccessibilityObject::matchedParent):
(WebCore::AccessibilityObject::isDescendantOfObject):
(WebCore::AccessibilityObject::isInsideARIALiveRegion):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
(WebCore::AccessibilityObject::isExpanded):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::focusableAncestor):
(WebCore::AccessibilityObject::editableAncestor):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSummary):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper tableCellParent]):
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
(-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
(-[WebAccessibilityObjectWrapper detailParentForObject:]):
(matchedParent): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/mac/details-summary-expected.txt:
* accessibility/mac/details-summary-role-description-expected.txt:
* accessibility/mac/details-summary-role-description.html:
* accessibility/mac/details-summary.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/mac/details-summary-expected.txt
LayoutTests/accessibility/mac/details-summary-role-description-expected.txt
LayoutTests/accessibility/mac/details-summary-role-description.html
LayoutTests/accessibility/mac/details-summary.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm