Html: Upstream focus navigation behavior for `delegatesFocus` from W3C spec.

Created on 5 Nov 2016  路  13Comments  路  Source: whatwg/html

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.

focus shadow

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 delegatesFocus flag is getting added in https://bugs.webkit.org/show_bug.cgi?id=166484.

All 13 comments

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:

Not 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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dherman picture dherman  路  69Comments

domenic picture domenic  路  92Comments

MylesBorins picture MylesBorins  路  65Comments

smfr picture smfr  路  98Comments

domenic picture domenic  路  60Comments