Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new role=image as synonym for role=img #4656

Open
1 task done
Tracked by #533
scottaohara opened this issue Dec 13, 2024 · 3 comments
Open
1 task done
Tracked by #533

Support new role=image as synonym for role=img #4656

scottaohara opened this issue Dec 13, 2024 · 3 comments
Labels
standards Issues in the ARIA standards objects (lib/standards)
Milestone

Comments

@scottaohara
Copy link
Contributor

Product

axe-core

Product Version

4.10.2

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

per the following test

<div role=image>foo</div>

the checker reports a"ARIA roles used must conform to valid values". role=image is a valid role which is supported by all browsers (wpt demonstrating role=image supported in all browsers.

ARIA in HTML is updating to indicate this is an allowed role for all the instances of where role=img was also allowed.

@scottaohara scottaohara added the ungroomed Ticket needs a maintainer to prioritize and label label Dec 13, 2024
@straker
Copy link
Contributor

straker commented Jan 8, 2025

Thanks for letting us know.

@straker straker added standards Issues in the ARIA standards objects (lib/standards) and removed ungroomed Ticket needs a maintainer to prioritize and label labels Jan 8, 2025
@WilcoFiers WilcoFiers changed the title false positive for use of valid role=image Support new role=image as synonym for role=img Jan 10, 2025
@WilcoFiers
Copy link
Contributor

We're going to need to test how well supported this is. I'd wager since this only just want in it isn't there yet. We'd have to report this as an unsupported role though, not as an invalid role.

@scottaohara
Copy link
Contributor Author

scottaohara commented Jan 10, 2025

definitely do your own testing to verify. but as mentioned, it's supported in all browsers as demonstrated by the passing WPT i linked to. all screen readers tested (VO -macos/ios, NVDA, Narrator, JAWS) treat it exactly the same as role=img, because the mapping are identical.

the only place where i'd imagine that maybe there wouldn't be support is with a user agent that doesn't use the accessibility tree, but instead still looks at just the dom.

@WilcoFiers WilcoFiers added this to the Axe-core 4.11 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

No branches or pull requests

3 participants