Sidebar
Keyboard
Press Tab to reach navigation items and the collapse or expand button. Press Enter or Space to toggle. Check that focus is retained when you collapse and expand.
Semantics
Give the navigation an accessible name. Collapsed content is excluded from keyboard and assistive technology navigation, while the expand button remains available. SidebarTrigger cannot be disabled. With asChild, pass one ref-forwarding element with an accessible name.
Checklist
- Give the navigation and collapse or expand button meaningful names.
- Check that collapsed content is skipped by Tab and that focus continues when you expand.
- Make every navigation item reachable on small screens and in a height-constrained area.
For contrast, zoom and screen reader checks, see the common accessibility checklist.