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

fix(sidebar): show close button to keyboard and screen reader users #6798

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

6TELOIV
Copy link

@6TELOIV 6TELOIV commented Feb 27, 2025

fixes #6761

I noticed that on the default variant (as opposed to new-york) of the sidebar, it was missing the SidebarTitle import, so I added that as well.

Copy link

vercel bot commented Feb 27, 2025

@6TELOIV is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@6TELOIV
Copy link
Author

6TELOIV commented Feb 28, 2025

To test this change, view one of the sidebar blocks on a mobile size browser window, and open it with the keyboard. The button should show up focused, hide when you tab off of it, and show again when you return focus (shift-tab or tab all the way thru the sidebar).

For non-keyboard non-screenreader users, this change should have no effect (the use of :focus-visible only shows it on keyboard navigation)

Here's a screenshot demonstrating the change:
image

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.

[bug]: [accessibility] Sidebar does not include a focusable dismiss element, trapping mobile screen readers
3 participants