-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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 accessible name of version dropdown in docs navbar #36495
Improve accessible name of version dropdown in docs navbar #36495
Conversation
09ff113
to
bd8e35a
Compare
before/after video, using Chrome/NVDA note how currently on large screen the button is announced, unsurprisingly, as "v5.2, button, collapsed". when opening the dropdown and moving focus to the first item, it announces the list as "v5.2 list with 11 items...", which is of course rubbish as the list itself doesn't refer to v5.2 overall. after this PR is applied, note how the button is not announced as "Bootstrap v5.2 (switch to other versions), button collapsed", and moving to the list then just announces it as "list with 11 items..." bootstrap-version-dropdown-tweak.mp4Didn't record a separate video, but: on medium-sized browser, when the "Bootstrap" text is visible in the dropdown, it won't announce it twice (thanks to the |
bd8e35a
to
750dfae
Compare
- add `aria-hidden="true"` to the "Bootstrap" text that is hidden on large screens - add separate visually-hidden "Bootstrap", which will be part of the accessible name regardless of whether the other string is visible or not (on large screen) - extra visually-hidden text to give some context - that the dropdown is about switching versions - remove the redundant id/aria-labelledby for the dropdown
750dfae
to
1e1551d
Compare
sorry, original PR had all the |
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.
LGTM! Thanks a lot for the detailed description and the video 👌
From what I understand it is not possible yet because of some package managers depending on it (more info in #29970) |
Yeah, we didn't get to remove the dist files yet but it's something we
should do for v6.
…On Sun, Jun 5, 2022, 10:16 Julien Déramond ***@***.***> wrote:
sorry, original PR had all the /dist/ and /js/ changes in it from running
the site locally to check. should those directories perhaps be added to
.gitignore?
From what I understand it is not possible yet because of some package
managers depending on it (more info in #29970
<#29970>)
—
Reply to this email directly, view it on GitHub
<#36495 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVLNKMQHRVLVPNTGCW77DVNRH6PANCNFSM5XZRVGNQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
@julien-deramond it might just be a bug in chrome, but without that forced space, NVDA kept seeing/announcing it as "Bootstrapv5.2" despite space after the closing span and the actual "v"
|
quick video recording without the 2022-06-05_09-55-26.mp4 |
- add `aria-hidden="true"` to the "Bootstrap" text that is hidden on large screens - add separate visually-hidden "Bootstrap", which will be part of the accessible name regardless of whether the other string is visible or not (on large screen) - extra visually-hidden text to give some context - that the dropdown is about switching versions - remove the redundant id/aria-labelledby for the dropdown
aria-hidden="true"
to the "Bootstrap" text that is hidden on large screens