haikuwebkit/LayoutTests/platform/glib/accessibility
Tyler Wilcock ca2e239f7d AX: Add ARIA role "image" as a new role, and leave "img" as a synonym
https://bugs.webkit.org/show_bug.cgi?id=224615

Patch by Tyler Wilcock <twilco.o@protonmail.com> on 2021-07-12
Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/image-role-is-synonomous-with-img-role.html

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
Add "image" ARIA role as a synonym for the "img" ARIA role, both of
which map to the AccessibilityRole::Image WebCore representation.

Also hardcode the ARIA reverse role map to return "image" for
the AccessibilityRole::Image key.

LayoutTests:

The "image" role is replacing the "img" role (though "img" is not
going away), so "image" should be returned from `computedRoleString`.

* accessibility/image-role-is-synonomous-with-img-role-expected.txt: Added.
* accessibility/image-role-is-synonomous-with-img-role.html: Added.

* accessibility/roles-computedRoleString-expected.txt:
* accessibility/roles-computedRoleString.html:
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* platform/glib/accessibility/roles-computedRoleString-expected.txt:
* platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt:
* platform/gtk/accessibility/image-link-expected.txt:
* platform/gtk/inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/wpe/accessibility/image-link-expected.txt:
All the tests in this group have been updated to expect "image"
instead of "img".

Canonical link: https://commits.webkit.org/239590@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-12 16:14:28 +00:00
..
add-children-pseudo-element-expected.txt
aria-fallback-roles-expected.txt
aria-hidden-negates-no-visibility-expected.txt
aria-label-on-label-element-expected.txt
aria-labelledby-overrides-aria-label-expected.txt
aria-labelledby-overrides-label-expected.txt
aria-option-role-expected.txt
aria-roledescription-expected.txt
aria-switch-sends-notification-expected.txt
aria-tab-roles-expected.txt
aria-table-attributes-expected.txt
aria-table-content-expected.txt
aria-toggle-button-with-title-expected.txt
auto-fill-crash-expected.txt
button-with-aria-haspopup-role-expected.txt
deleting-iframe-destroys-axcache-expected.txt
dimensions-include-descendants-expected.txt
double-nested-inline-element-missing-from-tree-expected.txt
empty-image-with-title-expected.txt
file-upload-button-stringvalue-expected.txt
focusable-inside-hidden-expected.txt
help-text-expected.txt
image-map1-expected.txt
img-with-svg-source-expected.txt
inline-continuations-expected.txt
label-with-pseudo-elements-expected.txt
list-detection-expected.txt
menu-list-crash2-expected.txt
menu-list-sends-change-notification-expected.txt
minimal-table-with-aria-is-data-table-expected.txt
radio-button-title-label-expected.txt
render-counter-text-expected.txt
roles-computedRoleString-expected.txt AX: Add ARIA role "image" as a new role, and leave "img" as a synonym 2021-07-12 16:14:28 +00:00
svg-remote-element-expected.txt
tabindex-elements-are-accessible-expected.txt
table-cells-roles-expected.txt
table-column-headers-with-captions-expected.txt
table-roles-hierarchy-expected.txt
text-alternative-calculation-hidden-nodes-expected.txt