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

Modal: make everything outside inert #53829

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

stokesman
Copy link
Contributor

What?

Bug fix/enhancement to Modal component.

Why?

I think inert is what we'd have used from the get go had it been well supported then.
To fix #41503
This should also help with other obscure problems like one that can be triggered by undo/redo keyboard shortcuts while a Modal is open.

a textbox underneath a modal will probably be focussed by the browser
#18755 (comment)

How?

Updates use of aria-hidden to inert.

Testing Instructions

  1. Open a post or page.
  2. Launch a Modal (If you're testing a fresh instance and the Welcome guide popped up).
  3. Click some part of your browser chrome
  4. Use keyboard tab to return focus back to the Modal.

@stokesman stokesman added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels Aug 20, 2023
@stokesman stokesman marked this pull request as draft August 21, 2023 19:33
Copy link

Flaky tests detected in 97232f0.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7579442555
📝 Reported issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defocus outside modal window does not allow navigating back with Tab
1 participant