Skip to content

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented May 6, 2025

Cherry-picks #31030 into the patch branch.

The dialog moves focus in an afterRender, because it needs to give the content some time to be rendered. This is problematic with some relatively recent behavior in Chrome where the aria-hidden gets blocked and a warning is logged if it contains the focused element.

These changes add a way for the container to indicate when it's done moving focus and use the new API to apply the aria-hidden.

Fixes #30187.

…gular#31030)

The dialog moves focus in an `afterRender`, because it needs to give the content some time to be rendered. This is problematic with some relatively recent behavior in Chrome where the `aria-hidden` gets blocked and a warning is logged if it contains the focused element.

These changes add a way for the container to indicate when it's done moving focus and use the new API to apply the `aria-hidden`.

Fixes angular#30187.
@crisbeto crisbeto requested a review from devversion May 6, 2025 07:09
@crisbeto crisbeto requested a review from a team as a code owner May 6, 2025 07:09
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label May 6, 2025
@crisbeto crisbeto requested review from mmalerba and ok7sai and removed request for a team May 6, 2025 07:09
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 6, 2025
@crisbeto crisbeto removed request for mmalerba and ok7sai May 6, 2025 08:17
@crisbeto crisbeto merged commit 85e4486 into angular:19.2.x May 6, 2025
28 of 30 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: cdk/dialog target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants