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

ARIA role "tab" not allowed for label element #820

Open
juthilo opened this issue Apr 22, 2024 · 3 comments
Open

ARIA role "tab" not allowed for label element #820

juthilo opened this issue Apr 22, 2024 · 3 comments

Comments

@juthilo
Copy link
Contributor

juthilo commented Apr 22, 2024

In the tab component, the label element gets the attribute role="tab".

According to the HTML spec (see label entry in table in linked section), no roles are allowed for the native label element, because it has "strong native semantics" and its role should not be overridden.

This gets flagged by our accessibility checker unless we explicitly disable the rule.

I saw that similar code was still included in db-ui/mono, so I hope we can find a solution for the current and future component that is fully compliant.

@mfranzke
Copy link
Member

mfranzke commented Apr 23, 2024

@juthilo, thanks a lot for your feedback.

I'm not totally happy with this pattern either, even though that the tradeoff is in between this and JavaScript reliance.
So as we would be searching for another solution, I'd like to even also involve a11y feedback. Out of curiosity, which accessibility checker solution are you using (I could've even also reproduced problems being reported by lighthouse)?

@juthilo
Copy link
Contributor Author

juthilo commented Apr 23, 2024

@mfranzke We're using the AXE plugin for Cypress and checking inbetween our Cypress test steps to cover all opened dialogs etc.

@mfranzke
Copy link
Member

I've just set up an issue within the other repository: db-ui/mono#2567

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

2 participants