The W3C's Shadow DOM spec modified sequential focus navigation behavior to take into account the state of the delegatesFocus flag given when creating ShadowRoots. This behavior should be brought into the WHATWG HTML spec.
Can someone assign me to this?
@rakina has started working on this, and it's great. See the auto-generated-by-GitHub links above for details.
Does anyone (especially @rakina) have thoughts on whether any of these should be landed independently, or all at once? I am glad @rakina is breaking up the work into small, easily reviewable pieces, but I am personally unsure whether we should land them separately or together.
We probably should land them all at once when either Gecko or WebKit successfully implements delegatesFocus in its engine. This area of the spec is hairy enough that we probably want to have the spec text vetted by another implementor. e.g. I'm still unclear about what exactly I'm implementing for the sequential focus navigation order between splitting of nodes into scopes & merging of scopes while dealing with all the random implementation complexity (e.g. option tab vs. tab) in WebKit.
Well, the reason I ask is that https://github.com/whatwg/html/pull/4735 and its tests are pretty independent from delegatesFocus. But I guess implementers might want to just do everything at once.
@domenic : I think Blink, Gecko, and WebKit all more or less implement the interoperable focusing behavior (module browser difference in what is considered as focusable) across shadow boundaries correctly. What's unclear is all the details of integration with delegatesFocus.
Ah OK, in that case we can probably merge #4735 ahead of the others, assuming that the test results confirm that the results are indeed interoperable.
Well, I guess that has some delegatesFocus stuff in it too, sorry, I misunderstood. Nevermind!
At TPAC a few people notified me that they're interested in following the spec progress for this but weren't sure if they saw everything related to this, so here's a list of relevant links
List of related PRs:
Issues:
delegatesFocus true keep the previous focused element focused if it's a shadow-including descendant of the host? https://github.com/w3c/webcomponents/issues/840Not really related to delegatesFocus, but helps clear things up in the focus spec:
As far as I've reviewed PRs, things are looking good. I've implemented the new tabIndex behavior in https://bugs.webkit.org/show_bug.cgi?id=199606 and delegatesFocus flag is getting added in https://bugs.webkit.org/show_bug.cgi?id=166484.
Hooray!! Spec updated! @rakina, can you file tracking issues for Gecko and Blink? Ideally you'd include pointers to all the new spec sections, and especially the new web platform tests, but for Blink I'll leave it to you.
@rniwa, it sounds like you've got things fully tracked on the WebKit side, but let us know if you'd appreciate any such bug.
Filed bugs in Blink:
focus delegation changes https://bugs.chromium.org/p/chromium/issues/detail?id=1014094
:focus selector changes https://bugs.chromium.org/p/chromium/issues/detail?id=1014091
Note that the new behavior has been fully implemented in WebKit:
:focus selector change: https://trac.webkit.org/r250788
delegatesFocus flag: https://trac.webkit.org/r251043
Let me know if you find any differences with WebKit's implementation with yours / spec.
Awesome! Thanks for implementing it so quickly.
Filed Gecko bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1589021
https://bugzilla.mozilla.org/show_bug.cgi?id=1589027
Most helpful comment
As far as I've reviewed PRs, things are looking good. I've implemented the new tabIndex behavior in https://bugs.webkit.org/show_bug.cgi?id=199606 and
delegatesFocusflag is getting added in https://bugs.webkit.org/show_bug.cgi?id=166484.