Closed Bug 1821523 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 38922 - Only return focus if focus was inside the popover before it closed

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 38922 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/38922
Details from upstream follow.

Mason Freed <masonf@chromium.org> wrote:

Only return focus if focus was inside the popover before it closed

If a user opens a popover, and then tab-navigates away from the
popover and the invoker, then it is unexpected that focus returns
to the popover invoker when the popover closes. This CL changes
the behavior so that focus is only returned if the current focus
is within the (shadow including) tree of the popover.

Fixed: 1422277
Bug: 1307772
Change-Id: Ibeb2646d2d23751108dc231fe2f23ff7570cd6e0
Reviewed-on: https://chromium-review.googlesource.com/4322607
WPT-Export-Revision: 55baef7bee7faccafacf8c5c1b05f28c37757dc7

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 24 subtests

Status Summary

Firefox

OK : 2
PASS: 1[GitHub] 2[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt]
FAIL: 26[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] 27[GitHub]

Chrome

OK : 2
PASS: 16
FAIL: 12

Safari

OK : 2
PASS: 1
FAIL: 27

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/semantics/popovers/popover-focus-2.html [wpt.fyi]
    • Popover focus navigation: FAIL (Chrome: FAIL, Safari: FAIL)
    • Circular reference tab navigation: FAIL [GitHub], PASS [Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt] (Chrome: FAIL, Safari: FAIL)
    • Popover focus returns when popover is hidden by invoker: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover focus only returns to invoker when focus is within the popover: FAIL (Chrome: FAIL, Safari: FAIL)
  • /html/semantics/popovers/popover-focus.html [wpt.fyi]
    • Popover focus test: default behavior - popover is not focused: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: default behavior - popover is not focused: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover focus test: autofocus popover: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus popover: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus popover: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus empty popover: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus empty popover: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus empty popover: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus popover with button: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus popover with button: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus popover with button: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus child: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus child: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus child: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus on tabindex=0 element: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus on tabindex=0 element: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus on tabindex=0 element: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus multiple children: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus multiple children: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus multiple children: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover focus test: autofocus popover and multiple autofocus children: FAIL (Chrome: PASS, Safari: FAIL)
    • Popover button click focus test: autofocus popover and multiple autofocus children: FAIL (Chrome: FAIL, Safari: FAIL)
    • Popover corner cases test: autofocus popover and multiple autofocus children: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c9b47a641e9b [wpt PR 38922] - Only return focus if focus was inside the popover before it closed, a=testonly https://hg.mozilla.org/integration/autoland/rev/dab4300ea739 [wpt PR 38922] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.