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

role-supports-aria-props documentation page displays a non working sample of code #938

Open
n-chardon opened this issue Jun 21, 2023 · 1 comment · May be fixed by #939
Open

role-supports-aria-props documentation page displays a non working sample of code #938

n-chardon opened this issue Jun 21, 2023 · 1 comment · May be fixed by #939

Comments

@n-chardon
Copy link
Contributor

The following code is displayed as the "Good" example of role-supports-aria-props rule :

<ul role="radiogroup" aria-required aria-labelledby="foo">
    <li tabIndex="-1" role="radio" aria-checked="false">Rainbow Trout</li>
    <li tabIndex="-1" role="radio" aria-checked="false">Brook Trout</li>
    <li tabIndex="0" role="radio" aria-checked="true">Lake Trout</li>
</ul>

However, this code does not work as intended, because the aria-required attribute has a "false" default value: it should be written as aria-required="true" to work properly with assistive technology.

I would recommend that the documentation be updated with a working example.

n-chardon added a commit to n-chardon/eslint-plugin-jsx-a11y that referenced this issue Jun 21, 2023
@n-chardon n-chardon linked a pull request Jun 21, 2023 that will close this issue
@ljharb
Copy link
Member

ljharb commented Jun 21, 2023

In HTML, does aria-required="aria-required" not work properly?

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

Successfully merging a pull request may close this issue.

2 participants