[wpt-sync] Sync PR 64148 - Clear focus when closing a dialog with no previously focused element
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64148 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64148
Details from upstream follow.
Helmut Januschka <helmut@januschka.com> wrote:
Clear focus when closing a dialog with no previously focused element
Closing a dialog restores focus to the element that was focused when it
opened, but when there was none, focus stayed on the node inside the
now-closed dialog, where it is no longer focusable: document key events
stopped firing until the page was refocused from the browser UI. Clear
the focused element in that case instead.Bug: 41284677
Change-Id: I17bdb61ab57195878a1751f8cdac3b0f90986f0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8644932
Reviewed-by: Joey Arhar \<jarhar@chromium.org>
Commit-Queue: Helmut Januschka \<helmut@januschka.com>
Cr-Commit-Position: refs/heads/main@{#1726476}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•26 days ago
|
| Assignee | ||
Updated•26 days ago
|
| Assignee | ||
Comment 1•26 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=114147
| Assignee | ||
Comment 2•24 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 149 tests and 1 subtests
Status Summary
Firefox
OK : 1[GitHub] 87[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 17[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 453[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 498[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 1[GitHub] 10[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
FAIL: 1
Safari
OK : 1
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/semantics/interactive-elements/the-dialog-element/dialog-close-focus-no-previous.html [wpt.fyi]
- Closing a dialog with no previously focused element should not leave focus inside it.:
FAIL(Chrome:FAIL, Safari:FAIL)
- Closing a dialog with no previously focused element should not leave focus inside it.:
- /html/semantics/interactive-elements/the-dialog-element/dialog-close-via-attribute.tentative.html [wpt.fyi]
- Removing the open attribute from an open modal dialog should run the closing algorithm.:
FAIL - Removing the open attribute from an open non-modal dialog should fire a close event.:
FAIL
- Removing the open attribute from an open modal dialog should run the closing algorithm.:
- /html/semantics/interactive-elements/the-dialog-element/dialog-focusability.html [wpt.fyi]
- The dialog element itself should not be keyboard focusable.:
FAIL
- The dialog element itself should not be keyboard focusable.:
- /html/semantics/interactive-elements/the-dialog-element/dialog-form-submission.html [wpt.fyi]
- returnValue doesn't update when there's no value attribute.:
FAIL
- returnValue doesn't update when there's no value attribute.:
- /html/semantics/interactive-elements/the-dialog-element/dialog-light-dismiss-touch.html [wpt.fyi]
- Dialog light dismiss should work with touch and not trigger a click event.:
FAIL
- Dialog light dismiss should work with touch and not trigger a click event.:
- /html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html [wpt.fyi]
- dialog computed overlay initially 'none':
FAIL - Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none':
FAIL
- dialog computed overlay initially 'none':
- /html/semantics/interactive-elements/the-dialog-element/dialog-requestclose-closedby.tentative.html [wpt.fyi]
- requestClose() should close the dialog even when computed closedby becomes none:
FAIL
- requestClose() should close the dialog even when computed closedby becomes none:
- /html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html [wpt.fyi]
- when opening multiple dialogs, the most recently opened is rendered on top:
FAIL
- when opening multiple dialogs, the most recently opened is rendered on top:
Comment 4•18 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5d4a83f7e120
https://hg.mozilla.org/mozilla-central/rev/8bae6c0540c1
Description
•