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

Presentational Roles Conflict Resolution vs image[alt=""] #2415

Open
giacomo-petri opened this issue Jan 29, 2025 · 0 comments
Open

Presentational Roles Conflict Resolution vs image[alt=""] #2415

giacomo-petri opened this issue Jan 29, 2025 · 0 comments

Comments

@giacomo-petri
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant