After discussing with Domenic Denicola, we resolved on stopping early return in case of inert `<dialog>`, and disconnected `<dialog>` will just do nothing at the "focus the control" step. The focus fixup rule still applies, meaning the focus is still moved to the viewport in case of modal `<dialog>`, given everything else is non-focusable. https://github.com/whatwg/html/commit/08b4033db249ea0c63fd35f4e8fa06e85ec20a6f https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule
Created attachment 445177 [details] Patch
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/31755
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
Comment on attachment 445177 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445177&action=review > LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html:32 > + "dialog.show(): focusing steps not change focus when dialog is inert"); typo: should not > LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert.html:42 > +}, "dialog.show(): focusing steps not change focus when dialog is inert"); typo here too
Created attachment 445183 [details] Patch
Committed r286174 (244557@main): <https://commits.webkit.org/244557@main>
<rdar://problem/85762641>