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

a11y: support fallback aria roles #8044

Closed
TorstenDittmann opened this issue Nov 21, 2022 · 1 comment
Closed

a11y: support fallback aria roles #8044

TorstenDittmann opened this issue Nov 21, 2022 · 1 comment

Comments

@TorstenDittmann
Copy link
Contributor

TorstenDittmann commented Nov 21, 2022

Describe the problem

Right now, multiple aria roles separated by space on the same element will throw a a11y-unknown-role warning.

For example, role="row button" will throw a warning for the unknown role row button - but should actually validate row and button individually.

The role attribute is a set of space separated tokens. If the first token is not accessibility supported (or valid), the next one will be used for determining the semantic role of the element, and so forth.

References:

Describe the proposed solution

Before checking the value, we can value.split(...) and check the values individually.

I would be more than happy to work on a PR 👍🏻

Alternatives considered

The alternative right now, is to add <!-- svelte-ignore a11y-unknown-role --> if you find yourself in this situation.

Importance

would make my life easier

@Conduitry
Copy link
Member

This should be available now in 3.54.0 - thank you!

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

3 participants