Bug 233514 - Update dialog focusing steps inert/disconnected handling
Summary: Update dialog focusing steps inert/disconnected handling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Nguyen (:ntim)
URL:
Keywords: InRadar
Depends on:
Blocks: dialog-element
  Show dependency treegraph
 
Reported: 2021-11-26 00:18 PST by Tim Nguyen (:ntim)
Modified: 2021-11-26 01:23 PST (History)
9 users (show)

See Also:


Attachments
Patch (11.23 KB, patch)
2021-11-26 00:37 PST, Tim Nguyen (:ntim)
koivisto: review+
Details | Formatted Diff | Diff
Patch (11.25 KB, patch)
2021-11-26 01:14 PST, Tim Nguyen (:ntim)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>