AX: ARIA 'region' role is now a landmark; HTML 'section' element should be a landmark only if named
https://bugs.webkit.org/show_bug.cgi?id=157331
Reviewed by Chris Fleizach.
Source/WebCore:
The 'region' role is now mapped as a landmark: The WebCore DocumentRegionRole
AccessibilityRole has been renamed to LandmarkRegionRole. The AXDocumentRegion
subrole has been renamed to AXLandmarkRegion. A 'section' element is mapped to
the LandmarkRegionRole if it has an author-provided accessible name via either
the aria-label or aria-labelledby attribute. Otherwise, it is mapped as GroupRole
with no subrole.
Our existing test coverage for exposure of the 'region' role and the 'section'
element is sufficient. These tests were updated to reflect the new behavior.
Several new test cases were added to cover both sections with accessible names
and those without.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
(WebCore::AccessibilityObject::isLandmark):
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
* platform/LocalizedStrings.cpp:
(WebCore::AXARIAContentGroupText):
Source/WebKit/win:
As part of this change, the WebCore DocumentRegionRole AccessibilityRole has
been renamed to LandmarkRegionRole. Update MSAARole() to use the new name.
* AccessibleBase.cpp:
(MSAARole):
Tools:
Add AXLandmarkRegion to the landmark strings handled by roleToString
for objects with ATK_ROLE_LANDMARK.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
LayoutTests:
Our existing test coverage for exposure of the 'region' role and the 'section'
element is sufficient. These tests were updated to reflect the new behavior.
Several new test cases were added to cover both sections with accessible names
and those without.
* accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
* accessibility/mac/aria-grouping-roles-expected.txt: Updated.
* accessibility/mac/aria-grouping-roles.html: Updated.
* accessibility/mac/html-section-elements-expected.txt: Updated.
* accessibility/mac/html-section-elements.html: Updated.
* accessibility/mac/landmark-not-ignored-expected.txt: Updated.
* accessibility/mac/landmark-not-ignored.html: Updated.
* accessibility/roles-computedRoleString-expected.txt: Updated.
* accessibility/roles-computedRoleString.html: New test cases added.
* accessibility/roles-exposed.html: New test cases added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated.
* platform/gtk/accessibility/roles-computedRoleString-expected.txt: Updated.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated.
* platform/win/accessibility/roles-exposed-expected.txt: Updated.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200415 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed