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. RenderStyle::effectiveInert() already matches this definition, Node::deprecatedIsInert() does not. Main reason for the removed check was to prevent the whole document from being inert to hit-testing, but with the RenderStyle approach, we instead override effectiveInert to false for the modal dialog. Removing this check for focus is absolutely fine however, since focusability isn't inherited. Tests added by this Chromium WPT: https://github.com/web-platform-tests/wpt/commit/0457111e7109ec3d9e575aa421b96d8c36ce2ae8
Created attachment 444178 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Created attachment 444179 [details] Patch
Committed r285791 (244235@main): <https://commits.webkit.org/244235@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444179 [details].
<rdar://problem/85391533>