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

Elements triggering Presentational Roles Conflict Resolution #2278

Open
giacomo-petri opened this issue Feb 6, 2025 · 3 comments
Open

Elements triggering Presentational Roles Conflict Resolution #2278

giacomo-petri opened this issue Feb 6, 2025 · 3 comments
Labels
accessibility support Accessibility support testing and tracking

Comments

@giacomo-petri
Copy link
Collaborator

giacomo-petri commented Feb 6, 2025

Accessibility support

Implementation of Presentational Roles Conflict Resolution varies from one browser or assistive technology to another. Depending on this, some semantic img elements can fail this rule with some technology but users of other technologies would not experience any accessibility issue.

and

Implementation of the Presentational Roles Conflict Resolution differs slightly from one user agent to the other. Hence, some elements might be exposed by one user agent and not by another, and consequently might create accessibility issues only for some users. Nevertheless, triggering the conflict is a bad practice.

ACT Rules

Test cases

Test case 1

Focusable (non-nevative tabindex computed value) elements with presentational role

<button role="presentation">Test</button>
<a href="#" role="presentation">Test</a>
<h1 role="presentation" tabindex="0">Test</h1>
<button role="presentation" tabindex="-1">Test</button>
<a href="#" role="presentation" tabindex="-1">Test</a>
<h1 role="presentation" tabindex="-1">Test</h1>
<img src="some_src" role="presentation" tabindex="0">

Test cases

Test instructions

  • Just run the test and check the element role

External links

@giacomo-petri giacomo-petri added the accessibility support Accessibility support testing and tracking label Feb 6, 2025
@giacomo-petri
Copy link
Collaborator Author

Test results

ARIA spec covers presentational roles conflict and browsers are consistently supporting that spec.

## Test case 1

- Date: 01 Jan 2024
- Operating system: not relevant
- Browser: Safari, Chrome, Firefox
- Assistive technology: not relevant
- Test result: Passed

@shunguoy
Copy link

shunguoy commented Feb 6, 2025

The purpose of the rules is to report the root cause of an issue properly so that the author can fix it, and browsers or ATs can handle the content consistently to minimize confusion.

  1. The "none" or "presentation" role can only be used in certain elements based on the Aria in HTML spec. For example, it is invalid to use the "none" or "presentation" role in or with a href.
    For the example, , the root cause of the issue is that the "presentation" role is not valid in this case. The only valid role for the with neither an alt attribute nor an accessible name is the implicit "img" role.

Those issues should be caught by this ACT rule.

  1. In the case , the has an implicit role "presentation", but it's focusable, causing an inconsistent issue with an AT and keyboard. No ACT rule covers this case. An ACT rule covers the case with aria-hidden.

@giacomo-petri
Copy link
Collaborator Author

Hi @shunguoy,

During the F2F meeting we discussed and put in place a procedure to better track the accessibility support notes so we can easily maintain them.

This issue is not meant to say that this is good. A presentational conflict role is by itself an author error and violation. The fact that browsers are solving this consistently, doesn't mean that it's fine.

I've opened this GitHub issue as an "accessibility support issue" because before there were some ambiguity in how browsers were handling those scenarios and we want to track which is their behaviour.

@daniel-montalvo daniel-montalvo changed the title [Accessibility Support] Elements triggering Presentational Roles Conflict Resolution Elements triggering Presentational Roles Conflict Resolution Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility support Accessibility support testing and tracking
Projects
None yet
Development

No branches or pull requests

2 participants