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

[Clarification] Presentational Roles Conflict Resolution - global WAI-ARIA states or properties on inherited presentational roles #2233

Open
giacomo-petri opened this issue May 29, 2024 · 3 comments · May be fixed by #2237
Assignees

Comments

@giacomo-petri
Copy link
Contributor

In the chapter on Presentational Roles Conflict Resolution, the 3rd bullet states:

If an element has global WAI-ARIA states or properties, user agents MUST ignore the none/presentation role and instead expose the element's implicit role. However, if an element has only non-global, role-specific WAI-ARIA states or properties, the element MUST NOT be exposed unless the presentational role is inherited and an explicit non-presentational role is applied.

Does this also encompass elements with an inherited presentational role? For instance:

<table role="presentation">
  <tbody>
    <tr>
      <td aria-description="Month">January</td>
      <td aria-description="Incoming">$100</td>
    </tr>
    <tr>
      <td aria-description="Month">February</td>
      <td aria-description="Incoming">$80</td>
    </tr>
  </tbody>
</table>

Is the third bullet relevant in this context?

I've observed that most browsers don't expose the td with a cell role (which seems reasonable), but perhaps we should clarify that the third bullet pertains solely to "explicit presentational roles."

@spectranaut
Copy link
Contributor

Might be a duplicate? #1389

@giacomo-petri
Copy link
Contributor Author

giacomo-petri commented May 31, 2024

While closely related, the focus of #1389 primarily revolves around "implicit presentational roles" (such as <button><h1 aria-label=1></h1></button>), whereas the current request specifically targets "inherited presentational roles" (<table role="presentation">...</table>).

As outlined in the "Presentational Roles Conflict Resolution" chapter:

User agents MUST NOT expose elements having explicit or inherited presentational role in the accessibility tree, with these exceptions:

"implicit presentational roles" are beyond the scope (to determine with #1389 if it is expected or not), while "inherited presentational roles" fall within it.

@spectranaut, for simplicity's sake, since this issue is closely linked to #1389, I'm more than happy to add this bit into the other ticket and closing this one. Let me know if it makes sense or if we want to keep these as 2 separate things.

@giacomo-petri
Copy link
Contributor Author

A few notes as a recap before proceeding with the PR:

  • I've retested the behavior on Chrome, Safari, and Firefox, (just to be sure) and they all identify the td element in my first example as "Generic" or "No matching ARIA role."
  • Since we agreed that if the presentational role is inherited, the content of the presentational ancestor element should continue to be presentational regardless of any global ARIA state or property, the applicability of the 3rd bullet point is limited to elements with an explicit presentational role.

Therefore, I will restrict the applicability of the 3rd bullet to elements with an explicit presentational role. I will also clearly specify what user agents must do when encountering a global state or property on an element with an inherited presentational role.

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