Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(dialog): If starting keyboard navigation from the URL bar - modal is not focused first! #24443

Open
1 task
demiro opened this issue Feb 18, 2022 · 0 comments
Labels
Accessibility This issue is related to accessibility (a11y) area: cdk/dialog area: material/dialog P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@demiro
Copy link

demiro commented Feb 18, 2022

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

When I am using the app normally and open the popup, I am able to circle through the content in modal window well with my TAB key...

The problem is when I focus my URL input box in browser and then try to cycle with TAB there to the page... the APP under the modal gets focused first and not the modal itself! Once I get to the modal, it stays in the modal correctly and cannot cycle out.

the only solutions to this would be to inject the modal before the app-root, or I did put the tabindex of the app-root to -1 and the modal first element to 1 - seems to do the trick

Reproduction

Steps to reproduce:

  1. Open modal window
  2. Click on browser's URL bar
  3. press TAB many times in order to get to the PAGE
  4. Observe what get's focused

Expected Behavior

I expect that when the modal is opened, it gets accessed first with key navigation

Actual Behavior

When starting cycling with TAB key from the url bar, the page under the modal gets accessed first

Environment

  • Angular: 12.2.11
  • CDK/Material: 12.2.9
  • Browser(s): Chrome 98
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@demiro demiro added the needs triage This issue needs to be triaged by the team label Feb 18, 2022
@wagnermaciel wagnermaciel added Accessibility This issue is related to accessibility (a11y) area: material/dialog P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Mar 16, 2022
@jelbourn jelbourn changed the title bug(MODAL): If starting keyboard navigation from the URL bar - modal is not focused first! Jun 28, 2022
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: cdk/dialog area: material/dialog P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
3 participants