Bug
1739737 [wpt PR 31533] - [inert] Let modal dialogs make the root element inert, a=testonly
Automatic update from web-platform-tests
[inert] Let modal dialogs make the root element inert
From https://html.spec.whatwg.org/multipage/interaction.html#inert,
> A Document document is blocked by a modal dialog subject if subject is
> the topmost dialog element in document's top layer. While document is
> so blocked, every node that is connected to document, with the
> exception of the subject element and its shadow-including descendants,
> must be marked inert.
This doesn't exclude the root element, so it should also be inert.
Simply doing this change would break these tests:
- html/dialog/modal-dialog-ancestor-is-inert.html
- html/dialog/modal-dialog-blocks-mouse-events.html
Excluding the root element in HitTestResult::SetInnerNode avoids that.
Note I plan to track inertness in ComputedStyle, and then remove both
Node::IsInert and hit test retargeting for inert. So this patch is just
temporary, to align with the final behavior.
Also note that only the the root element (documentElement) is affected.
The root node (document), represented as rootWebArea in a11y, will still
not become inert when there is a modal dialog or fullscreen element.
Bug: 692360
TEST=All/DumpAccessibilityTreeTest.AccessibilityModalDialogOpened/blink
TEST=All/DumpAccessibilityTreeTest.AccessibilityModalDialogStack/blink
TEST=All/DumpAccessibilityTreeTest.AccessibilityOpenModal/blink
TEST=external/wpt/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable.html
Change-Id: I8ce7905a85e386fae6163423f5e078b6c4588db1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3263132
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941302}
--
wpt-commits:
0457111e7109ec3d9e575aa421b96d8c36ce2ae8
wpt-pr: 31533