Skip to content

fix(material/sidenav): mark content as inert while open#33247

Open
crisbeto wants to merge 2 commits into
angular:mainfrom
crisbeto:32805/sidenav-aria-hidden
Open

fix(material/sidenav): mark content as inert while open#33247
crisbeto wants to merge 2 commits into
angular:mainfrom
crisbeto:32805/sidenav-aria-hidden

Conversation

@crisbeto
Copy link
Copy Markdown
Member

@crisbeto crisbeto commented May 12, 2026

Even though we trap focus within the sidenav, it's still possible for users' focus to escape and go into the content that's hidden behind it.

These changes mark the content as inert while a sidenav is open.

Also fixes one issue I found along the way which prevented queries from resolving the sidenav content.

Fixes #32805.

crisbeto added 2 commits May 12, 2026 10:03
Fixes that a content query for `MatDrawerContent` wasn't resolving `MatSidenavContent` in the sidenav container.
Even though we trap focus within the sidenav, it's still possible for users' focus to escape and go into the content that's hidden behind it.

These changes mark the content as `inert` while a sidenav is open.

Fixes angular#32805.
@crisbeto crisbeto added Accessibility This issue is related to accessibility (a11y) merge: preserve commits When the PR is merged, a rebase and merge should be performed target: rc This PR is targeted for the next release-candidate labels May 12, 2026
@pullapprove pullapprove Bot requested review from andrewseguin and ok7sai May 12, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility This issue is related to accessibility (a11y) area: material/sidenav merge: preserve commits When the PR is merged, a rebase and merge should be performed target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(material/sidenav): [a11y] Sidenav with mode="over" doesn't trap screen reader virtual cursor

2 participants