Closed Bug 1865971 Opened 11 months ago Closed 10 months ago

[wpt-sync] Sync PR 43268 - Reland: Put back the dialog SupportsFocus change

Categories

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

task

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mason Freed <masonf@chromium.org> wrote:

Reland: Put back the dialog SupportsFocus change

The [1] CL attempted to change SupportsFocus for dialogs to always
be true, but that caused some dialogs to become keyboard focusable
when they shouldn't be.

This CL re-lands that behavior, but with the keyboard focusability
fixed: IsKeyboardFocusable needed to look explicitly at the things
that allow keyboard focusable dialogs, such as tabindex. Those are
handled by the base class Element::SupportsFocus.

This also adds a DCHECK in focus_controller to make sure things
that are IsKeyboardFocusable() do not have negative tabindexes.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/4959753
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/html/semantics/interactive-elements/the-dialog-element/dialog-focusability.html

Bug: 1499838
Change-Id: I7e87d1f707c35545e48e53bba58b5ba4cbce5124
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034524
Auto-Submit: Mason Freed \<masonf@chromium.org>
Reviewed-by: Di Zhang \<dizhangg@chromium.org>
Commit-Queue: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1227721}

PR 43268 applied with additional changes from upstream: 46a99559f2d55c96927f97969afd32202304a209
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/068b13d20196 [wpt PR 43268] - Reland: Put back the dialog SupportsFocus change, a=testonly
Test result changes from PR not available.
Test result changes from PR not available.
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a4bcfc4a9585 [wpt PR 43268] - Reland: Put back the dialog SupportsFocus change, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.