axe-core icon indicating copy to clipboard operation
axe-core copied to clipboard

Support new role=image as synonym for role=img

Open scottaohara opened this issue 11 months ago • 3 comments

Product

axe-core

Product Version

4.10.2

Latest Version

  • [x] 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 avatar Dec 13 '24 18:12 scottaohara

Thanks for letting us know.

straker avatar Jan 08 '25 20:01 straker

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.

WilcoFiers avatar Jan 10 '25 15:01 WilcoFiers

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.

scottaohara avatar Jan 10 '25 15:01 scottaohara