AX: <footer> HTML5 tag not reading as ARIA Landmark to VoiceOver
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 19:15:23 +0000 (19:15 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 19:15:23 +0000 (19:15 +0000)
commita4911f108934ac85ebe97acc81701d8729ff30ac
tree33b11aefa71703817cbe69608a131d0cee103c54
parent97790ae293f5c180e63e047a9f955ecbc9b7889a
AX: <footer> HTML5 tag not reading as ARIA Landmark to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=190138
<rdar://problem/44907695>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Make sure that footer elements use the right role depending on their context.
If scoped to body, they become contentinfo. Otherwise they are just delineated by
a footer subrole.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isLandmark const):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::isDescendantOfElementType const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper subrole]):

LayoutTests:

* accessibility/mac/footer-expected.txt:
* accessibility/mac/footer-roledescription-expected.txt:
* accessibility/mac/footer-roledescription.html:
* accessibility/mac/footer.html:
* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/ios-simulator/landmark-type-expected.txt
LayoutTests/accessibility/ios-simulator/landmark-type.html
LayoutTests/accessibility/mac/footer-expected.txt
LayoutTests/accessibility/mac/footer-roledescription-expected.txt
LayoutTests/accessibility/mac/footer-roledescription.html
LayoutTests/accessibility/mac/footer.html
LayoutTests/accessibility/roles-computedRoleString-expected.txt
LayoutTests/accessibility/roles-computedRoleString.html
LayoutTests/platform/gtk/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/mac-wk2/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm