Skip to content

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

Open
@giacomo-petri

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?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions