-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
role-suports-aria-props
is not flagging prohibited accessible name usage on generic elements
#910
Comments
@khiga8 hello Kate! Directionally, you are on to something here. We don't have a rule that prohibits labels on elements or in combination with roles that do not support a label. I wouldn't do that in this rule, because it is specifically concerned with the combination of ARIA Role and ARIA Prop. In your examples, none of the HTML elements have a role. It's true that the |
@khiga8 would you like to update this issue to reflect that you're asking for a new rule? |
Hi @jessebeach! I'd noticed in the
I'm not sure I understand quite why this use case falls outside of this rule. Would you mind elaborating 🙏? |
You're right! Alright, this is the right place for this sort of restriction and I agree with you now that this rule isn't catching all cases. The best way to approach this is for me to update Thank you for being persistent here! |
I opened a PR to fix this—reviews and feedback welcomed! Flag |
I would expect role-suports-aria-props to flag prohibited accessible name usage on generic elements like:
etc.
We see this misuse of accessible name a lot in our projects and we're hoping this is a case we can cover with
eslint-plugin-jsx-a11y
.I'd hoped that the latest bump of aria-query in #814 would start flagging these issues, but when I update the tests in tests/src/rules/role-supports-aria-props-test.js on the latest
main
to include invalid cases like:it doesn't seem like it's being recognized as invalid.
The text was updated successfully, but these errors were encountered: