Modal: use inert instead of aria-hidden for non-modal isolation - #79969
Closed
ramonjd wants to merge 3 commits into
Closed
Modal: use inert instead of aria-hidden for non-modal isolation#79969ramonjd wants to merge 3 commits into
ramonjd wants to merge 3 commits into
Conversation
|
Size Change: -8 B (0%) Total Size: 7.67 MB 📦 View Changed
|
This was referenced Jul 8, 2026
aria-hidden removes elements from the accessibility tree but leaves them keyboard-accessible. inert does both — hidden from assistive technology and unreachable via Tab/keyboard navigation.
ramonjd
force-pushed
the
fix/modal-inert-isolation
branch
from
July 8, 2026 01:51
3c08b1b to
2dc97be
Compare
Member
Author
|
I think some of the e2e fails are related. not sure. i won't have much time to look at this PR before 7.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What? How?
This is a bit of a YOLO PR.
Context: this was flagged during an accessibility review of the media editor modal, but the
modalize()helper is shared by every Modal in Gutenberg, so the change is split out here for broader review.Switches the Modal component's background isolation from
aria-hiddento theinertattribute.Why
aria-hiddenremoves elements from the accessibility tree but leaves them keyboard-accessible — users can still Tab into content behind the modal.inertdoes both: hidden from assistive technology and unreachable via keyboard navigation.The
inertattribute has been baseline across all browsers since 2023.Test plan