Bug 233514

Summary: Update dialog focusing steps inert/disconnected handling
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: DOMAssignee: Tim Nguyen (:ntim) <ntim>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, clopez, esprehn+autocc, ews-watchlist, gyuyoung.kim, koivisto, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/31755
https://bugzilla.mozilla.org/show_bug.cgi?id=1743082
Bug Depends on:    
Bug Blocks: 84635    
Attachments:
Description Flags
Patch
koivisto: review+
Patch none

Description Tim Nguyen (:ntim) 2021-11-26 00:18:38 PST
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
Comment 1 Tim Nguyen (:ntim) 2021-11-26 00:37:34 PST
Created attachment 445177 [details]
Patch
Comment 2 Tim Nguyen (:ntim) 2021-11-26 00:37:59 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/31755
Comment 3 EWS Watchlist 2021-11-26 00:38:44 PST
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 4 Tim Nguyen (:ntim) 2021-11-26 01:01:25 PST
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
Comment 5 Tim Nguyen (:ntim) 2021-11-26 01:14:32 PST
Created attachment 445183 [details]
Patch
Comment 6 Tim Nguyen (:ntim) 2021-11-26 01:22:27 PST
Committed r286174 (244557@main): <https://commits.webkit.org/244557@main>
Comment 7 Radar WebKit Bug Importer 2021-11-26 01:23:22 PST
<rdar://problem/85762641>