Presentational Roles Conflict Resolution vs image[alt=""] #2415
Description
Description:
In the ARIA specifications, the Presentational Roles Conflict Resolution section applies to elements with either an explicit or inherited presentational role:
User agents MUST NOT expose elements having explicit or inherited presentational role in the accessibility tree, with these exceptions: ...
In this context, it seems (based on the bullet points below) that “inherited” refers to roles inherited from ancestor elements, not from other attributes, but I could be mistaken. If my assumption is correct, what happens when an element has a presentational role provided through another mechanism? For example, consider an image with an empty alt attribute and a non-negative tabindex attribute:
<img alt="" src="..." tabindex="0">
Would this fall under the scope of the ARIA specification? Or is this more relevant to ARIA in HTML? Either way, it seems unclear, or perhaps undefined, how such cases should be handled.
I’ll submit a PR for WPT that demonstrates how browsers consistently treat this scenario.
Locally, these are the results:
- Safari: Action get_computed_role completed with result image
- Chrome: Action get_computed_role completed with result image
- Firefox: Action get_computed_role completed with result image
Despite the presentational role being implicit, browsers expose the element with the role="image". Should we clarify or define expectations for these cases somewhere?