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

New lint rule (warning): avoid overloading aria-describedby with many attributes #89

Open
aubreyquinn opened this issue Sep 16, 2024 · 0 comments

Comments

@aubreyquinn
Copy link
Collaborator

Overloading aria-describedby with Multiple Descriptions

Misuse Example: Providing excessive or overly detailed descriptions.

<button aria-describedby="desc1 desc2 desc3 desc4">Submit</button>
<p id="desc1">Submit the form</p>
<p id="desc2">Ensure all fields are filled out</p>
<p id="desc3">You will receive a confirmation email</p>
<p id="desc4">Contact support if there are issues</p>

Why it’s wrong: While aria-describedby can accept multiple IDs, overwhelming users with too much information can hinder rather than help accessibility.

Descriptions should be concise and directly relevant to the element. Providing too much content can make navigation frustrating for screen reader users.

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

1 participant