Closed Bug 1481079 Opened 6 years ago Closed 6 years ago

[FIX] shadow host with tabindex(and with children with tabindex too) cannot be self-focused by tab

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: zjz, Assigned: smaug)

References

Details

Attachments

(2 files)

Attached file testcase.html
Please see the testcase.html

Test with Firefox:

Only the inner <div> can be focused by tab.

Test with Chrome:

Both the two <div>s can be focused by tab.
Summary: shadow host with tabindex itself cannot be focused by tab → shadow host with tabindex(and with children with tabindex too) cannot be self-focused by tab
smaug, which browser is correct? If we are correct per spec, does it make sense for the spec to say whatever it says?
Flags: needinfo?(bugs)
Priority: -- → P3
I think even if the behaviour of Firefox is conformant to the spec, it doesn't make sense to disallow a focusable element to be tabbed to while allowing it to be focused by click.

It make senses to totally disallow focus by either tab or click, or to totally allow it.
I would expect us to have still issues here.
Flags: needinfo?(bugs)
Assignee: nobody → bugs
So if host itself is focusable, it should be focused just like any other normal element. Then later we'll enter its scope.
Attachment #8999203 - Flags: review?(mrbkap)
Summary: shadow host with tabindex(and with children with tabindex too) cannot be self-focused by tab → [FIX] shadow host with tabindex(and with children with tabindex too) cannot be self-focused by tab
Attachment #8999203 - Flags: review?(mrbkap) → review+
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/141dc7ae832e
Shadow DOM hosts should be focusable, r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/141dc7ae832e
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: