haikuwebkit/LayoutTests/platform/gtk/accessibility/gtk
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
..
media-controls-panel-title-expected.txt
replaced-objects-in-anonymous-blocks-expected.txt
xml-roles-exposed-expected.txt