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

> If we always choose the first clickable element in the shadow tree, ignoring slot assigments at all, we will focus clickable-element2. Is that acceptable behavior?

FWIW we can definitely use the flat tree even if we're not using the "sequential focus navigation" delegation anymore.

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

This might have some problems with slotted elements. What if we use the actual elements instead? So like `host.setFocusDelegationTarget(el)`? The default behavior if the focus delegation target is not set would be to focus the first focusable thing in flat-tree order, but if it's set it will always focus on `el`.

-- 
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-526587928

Received on Friday, 30 August 2019 12:46:43 UTC