Re: [w3c/webcomponents] Focus delegation from shadow host should not behave like sequential focus navigation (#830)

> * We don't really have that control for the main document, so giving that control for shadow children seems strange.
> * Any explicit focus control starts to collide with user agents' desires to provide platform-aligned defaults

Yeah, both of these are highly problematic. What if we let `delegatesFocus` take an ID as in: `delegatesFocus: "foo"` and pick the first element with that ID? ID is unique per shadow tree so there is no ambiguity. But this probably needs to be used only in the case of an explicit `focus` call or when the user clicks somewhere on a custom element but not elements within its shadow tree themselves.

In the case when the user uses sequential focus navigation, the UA should probably decide where the focus should go based on what it decides to be focusable within the shadow tree. Otherwise, we'd end up with a bunch of components that try to implement Windows behavior to delegate the focus to hyperlinks and bunch others that try to match macOS to skip hyperlinks and only delegate to editable text fields.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/830#issuecomment-526000464

Received on Thursday, 29 August 2019 02:58:00 UTC