You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 rolerow button
- but should actually validaterow
andbutton
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
The text was updated successfully, but these errors were encountered: