-
-
Notifications
You must be signed in to change notification settings - Fork 639
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-label should not be required when role="heading" #1002
Comments
I have confirmed that
However, I am unable to reproduce the linting issue as described. This code below correctly produces no warning. /* eslint
"jsx-a11y/role-has-required-aria-props": "warn",
*/
const Heading = () => (
<div role="heading" aria-level={3}>
Vite + React
</div>
);
export default Heading; Nonetheless I will prepare a PR that includes validity testing for this scenario. |
Add unit tests to ensure that there are no warnings when role="heading" is used when aria-level is provided. For example, aria-label is not required. See jsx-eslint#1002
Add unit tests to ensure that there are no warnings when role="heading" is used when aria-level is provided. For example, aria-label is not required. See jsx-eslint#1002
We can probably close this issue now. PR with reinforcement tests have been added. |
Closed by #1022. |
as described here: https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA12#example-1-simple-headings
The text was updated successfully, but these errors were encountered: