You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sidebar does not (by default) include a button to dismiss the sidebar sheet on mobile.
This has critical accessibility implications for mobile users of screen readers, as once they are in the sidebar drawer, it is impossible to dismiss it (there is no escape key to press, and they cannot interact with any element that would cause disimissal).
The only way out I see is a hard refresh.
My recommended fix: Add a visible x dismissal button to the sidebar, as is present in the sheet component.
6TELOIV
changed the title
[bug]: [accessibility] Sidebar does not include a focusable dismiss element
[bug]: [accessibility] Sidebar does not include a focusable dismiss element, trapping mobile screen readers
Feb 24, 2025
Describe the bug
The sidebar does not (by default) include a button to dismiss the sidebar sheet on mobile.
This has critical accessibility implications for mobile users of screen readers, as once they are in the sidebar drawer, it is impossible to dismiss it (there is no
escape
key to press, and they cannot interact with any element that would cause disimissal).The only way out I see is a hard refresh.
My recommended fix: Add a visible
x
dismissal button to the sidebar, as is present in the sheet component.Affected component/components
Sidebar
How to reproduce
Notice that there is no way to exit the sidebar without pressing escape or clicking the negative space next to the drawer.
On iOS or android screen readers, this makes it impossible to exit the sidebar.
Codesandbox/StackBlitz link
https://ui.shadcn.com/view/styles/new-york/sidebar-07
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: