Skip to content

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

Merged
crisbeto merged 2 commits into
angular:mainfrom
crisbeto:32805/sidenav-aria-hidden
May 12, 2026
Merged

fix(material/sidenav): mark content as inert while open#33247
crisbeto merged 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
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 12, 2026
@crisbeto crisbeto merged commit 930fe9b into angular:main May 12, 2026
37 checks passed
@crisbeto
Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

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) action: merge The PR is ready for merge by the caretaker 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