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

Rule idea: explicit role is not same as implicit #2085

Open
Jym77 opened this issue Jul 13, 2023 · 1 comment
Open

Rule idea: explicit role is not same as implicit #2085

Jym77 opened this issue Jul 13, 2023 · 1 comment

Comments

@Jym77
Copy link
Collaborator

Jym77 commented Jul 13, 2023

While working on #2084, I found this bit of ARIA in HTML:

Conformance checkers SHOULD flag instances where authors are explicitly providing an element with a role which matches its implicit ARIA semantics as failures, as it is NOT RECOMMENDED for authors to explicitly set these roles.

From this, it feels like it would make sense to have a rule checking that, since tools are expected to fail it.
OTOH, this rule would only be a best practice, not even mapping to ARIA in HTML, since this is allowed but not recommended 🤔 We're not really having any of these currently…

So, should we have a rule to check that the explicit role is not the same as the implicit role?

@dd8
Copy link
Collaborator

dd8 commented Aug 22, 2023

The W3 validator currently flags this. One problem area is tables where you sometimes need an explicit role=table to override layout table heuristics which act like an implicit role=presentation on some tables:
https://www.powermapper.com/blog/layout-tables-vs-data-tables/

There's an issue on html-aam for the role=table problem:
w3c/html-aam#293

Edit: it's worth finding out why this is NOT RECOMMENDED - I think it caused problems in some browser a11y tree implementations.

@Jym77 Jym77 changed the title Rule idea? explicit role is not same as implicit Rule idea: explicit role is not same as implicit Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants