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

Improve accessibility when announcing Listbox.Option and Combobox.Option components #1812

Merged
merged 3 commits into from Sep 2, 2022

Conversation

RobinMalfait
Copy link
Collaborator

This PR improves the aria-selected attribute for Listbox.Option and Combobox.Option components
by explicitly marking them as true or false.

Fixes: #1599

The WAI-ARIA Best Practices don't recommend this and prefer
`aria-selected: true` or undefined (aka not existing when it is
"false"). However in practice, both MacOS VoiceOver and NVDA experience
strange issues if you don't do this (e.g.: everything before the
selected item is also selected)
@vercel
Copy link

vercel bot commented Sep 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Sep 2, 2022 at 2:18PM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Sep 2, 2022 at 2:18PM (UTC)

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 this pull request may close these issues.

NVDA does not announce the selected entry in "listbox" and "combobox"
1 participant