AX: Implement support for ARIA roles insertion, deletion, subscript, superscript...
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jul 2019 13:36:50 +0000 (13:36 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jul 2019 13:36:50 +0000 (13:36 +0000)
commit9d5b5cdb9c635696ef6d15920d30f5d4e7a28a88
tree9e6e7022c6b464146328834a5c09fe262b92b253
parentb17abfd7025a2379ae49d7045e40c6ecad545a94
AX: Implement support for ARIA roles insertion, deletion, subscript, superscript, and time
https://bugs.webkit.org/show_bug.cgi?id=199692

Reviewed by Chris Fleizach.

Source/WebCore:

Create new AccessibilityRole types which correspond to the new ARIA roles and
update AccessibilityRenderObject::determineAccessibilityRole() to assign these
internal roles to the related HTML elements.

Update both ATK and Mac to recognize these new internal roles. In addition, update
the ATK mappings for the ins and del elements to ATK_ROLE_CONTENT_INSERTION and
ATK_ROLE_CONTENT_DELETION respectively. Also expose "insertion" and "deletion" via
the AtkObject xml-roles attribute so that this information is not completely absent
for GTK or WPE built against earlier versions of ATK.

Remove AccessibilityObject's isSubscriptStyleGroup() and isSuperscriptStyleGroup().
These two methods were only being used by ATK and are no longer needed for platform
role mapping.

No new tests. Instead add the roles to the existing role-exposure tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::isSubscriptStyleGroup const): Deleted.
(WebCore::AccessibilityObject::isSuperscriptStyleGroup const): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessible.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):

Tools:

Add support for output of AXDeletion and AXInsertion roles for tests.
Update GTK and WPE jhbuild modules to use version of ATK and AT-SPI2
which include ROLE_CONTENT_DELETION and ROLE_CONTENT_INSERTION.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

LayoutTests:

Add the new roles to the existing role-exposure tests and update expectations accordingly.

* accessibility/gtk/object-attributes-expected.txt:
* accessibility/gtk/object-attributes.html:
* accessibility/gtk/xml-roles-exposed-expected.txt:
* accessibility/gtk/xml-roles-exposed.html:
* accessibility/roles-computedRoleString.html:
* accessibility/roles-exposed.html:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/mac-wk2/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:
* platform/wpe/accessibility/roles-computedRoleString-expected.txt:
* platform/wpe/accessibility/roles-exposed-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247349 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/gtk/object-attributes-expected.txt
LayoutTests/accessibility/gtk/object-attributes.html
LayoutTests/accessibility/gtk/xml-roles-exposed-expected.txt
LayoutTests/accessibility/gtk/xml-roles-exposed.html
LayoutTests/accessibility/roles-computedRoleString.html
LayoutTests/accessibility/roles-exposed.html
LayoutTests/platform/gtk/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/gtk/accessibility/roles-exposed-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
LayoutTests/platform/wpe/accessibility/roles-computedRoleString-expected.txt
LayoutTests/platform/wpe/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityObjectInterface.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/atk/WebKitAccessible.cpp
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/gtk/jhbuild.modules
Tools/wpe/jhbuild.modules