Closed Bug 1586425 Opened 2 months ago Closed Last month

[wpt-sync] Sync PR 19530 - Fix shadow-dom/focus/focus-selector-delegatesFocus.html for slotted elements

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ryosuke Niwa <rniwa@webkit.org> wrote:

Fix shadow-dom/focus/focus-selector-delegatesFocus.html for slotted elements

As specified in https://html.spec.whatwg.org/multipage/semantics-other.html#element-has-the-focus, an element has focus when itself is in the focus chain or its shadow root contains the focused element.

Since the shadow tree does not contain a slotted element, its shadow host should not match :focus pseudo class. Otherwise, the shadow host's tree would end up containing more than one element which match :focus, for example, the shadow host and its direct child which is actually focused.

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Ran 1 tests and 8 subtests
OK     : 1
PASS   : 2
FAIL   : 6
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc71a8e1bfa7
[wpt PR 19530] - Fix shadow-dom/focus/focus-selector-delegatesFocus.html for slotted elements, a=testonly
Status: NEW → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.