-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Tab aria selected #1723
Tab aria selected #1723
Conversation
🦋 Changeset detectedLatest commit: 71876ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Hello! Thank you for opening your first PR to Starlight! ✨ Here’s what will happen next:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @OliverSpeir!
MDN’s aria-selected
docs also says:
All inactive tabs in the tablist should have
aria-selected="false"
set.
So sounds like is indeed the correct behaviour. Appreciate the fix 💖
Did a bit of manual testing, it looks like this regression was introduced somewhere along Big Sur (as Safari major versions are tied to macOS versions). To my knowledge, omitting Amazing find and fix 👍 |
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
That's a bummer this doesn't work anymore then, I agree not having Y not selected is significantly better UX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To my knowledge, omitting
aria-selected=false
entirely was often a practice used to reduced the noise with some screen readers
Ah, that is interesting. Thanks for sharing @HiDeoo. Something to monitor then, just in case this change actually makes for a worse experience. But definitely seems like an improvement over all tabs being announced as selected.
Thanks again @OliverSpeir 🙌
What
Instead of removing the aria-selected attribute, set it to false for the tabs that are not selected.
Why
When using VoiceOver (built in macos screenreader) if a tab does not have aria-selected="false" it is read as "selected", so right now starlight tabs are all read as selected making it confusing to know which one is actually selected