Skip to content

fix(ui): expose aria-expanded on SidebarTrigger - #11593

Open
loulanyue wants to merge 1 commit into
shadcn-ui:mainfrom
loulanyue:fix/sidebar-trigger-aria-expanded
Open

fix(ui): expose aria-expanded on SidebarTrigger#11593
loulanyue wants to merge 1 commit into
shadcn-ui:mainfrom
loulanyue:fix/sidebar-trigger-aria-expanded

Conversation

@loulanyue

Copy link
Copy Markdown

Summary

Fixes #11591

SidebarTrigger toggles the sidebar but did not expose its expanded/collapsed state with aria-expanded. As a result, assistive technologies announced "Toggle Sidebar, button" without indicating whether the sidebar is currently open.

This PR adds aria-expanded={isMobile ? openMobile : open} to SidebarTrigger across all registry sidebar styles (base, radix, aria, new-york-v4), complying with the WAI-ARIA disclosure pattern.

Expose active expanded/collapsed state via aria-expanded on SidebarTrigger
responsive to desktop open and mobile openMobile states, complying with the
WAI-ARIA disclosure pattern.

Fixes shadcn-ui#11591
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

Can you sign the commits please? See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits. Thank you.

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]: SidebarTrigger does not expose aria-expanded

1 participant