Re: [w3c/webcomponents] :focus behavior of delegatesFocus:true will be confusing for users (#554)

Yes, custom elements may be focusable or not. But in my opinion, if the element is not *itself* focusable, it makes no sense for it to match `:focus`.

Two examples:
- `<input type=date>`, re-created identically but as a custom element, named something like `<date-input>`. This would be *focusable*, and have *focusable elements in its shadow DOM*. So, the host *would* match `:focus`, as would whichever descendant inside of the shadow root which currently had focus (e.g. day, month or year). You can sensibly have two levels of focus indicator in this case.
- `<x-sidebar>`, as a composition of all the elements in the github sidebar (Labels, Milestone, etc.) which can be easily dropped into a page. This *includes* focusable elements, but is not *itself* focusable. It seems to me to make sense that this element should *not* match `:focus` when one of its descendants is focused, because it is not focusable itself.

-- 
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/554#issuecomment-242625552

Received on Friday, 26 August 2016 04:08:01 UTC