haikuwebkit/LayoutTests/platform/gtk/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
..
gtk AX: Add ARIA role "image" as a new role, and leave "img" as a synonym 2021-07-12 16:14:28 +00:00
aria-checkbox-sends-notification-expected.txt
aria-combobox-hierarchy-expected.txt
aria-hidden-false-works-in-subtrees-expected.txt
aria-inherits-presentational-expected.txt
aria-menubar-menuitems-expected.txt
aria-role-on-label-expected.txt
aria-selected-expected.txt
aria-selected-menu-items-expected.txt
aria-switch-text-expected.txt
aria-table-hierarchy-expected.txt
color-well-expected.txt
content-editable-as-textarea-expected.txt
css-content-attribute-expected.txt
datetime-attribute-expected.txt
form-control-value-settable-expected.txt
generated-content-with-display-table-crash-expected.txt
image-link-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
image-map2-expected.txt
image-with-alt-and-map-expected.txt
img-fallsback-to-title-expected.txt
lists-expected.txt
math-fenced-expected.txt
math-foreign-content-expected.txt
math-mo-fences-and-separators-expected.txt
math-multiscript-attributes-expected.txt
math-text-expected.txt
meter-element-expected.txt
platform-name-expected.txt
press-targets-center-point-expected.txt
roles-exposed-expected.txt
svg-element-with-aria-role-expected.txt
table-attributes-expected.txt
table-cell-spans-expected.txt
table-cells-expected.txt
table-detection-expected.txt
table-hierarchy-expected.txt
table-one-cell-expected.txt
table-sections-expected.txt
table-with-rules-expected.txt
transformed-element-expected.txt
w3c-svg-content-language-attribute-expected.txt
w3c-svg-description-calculation-expected.txt
w3c-svg-elements-not-exposed-expected.txt
w3c-svg-name-calculation-expected.txt
w3c-svg-presentational-role-expected.txt
w3c-svg-roles-expected.txt