- From: Mason Freed <notifications@github.com>
- Date: Mon, 16 Sep 2019 05:59:41 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 16 September 2019 13:00:03 UTC
I'm coming late to the party, but I have a question. Thinking about this from a user's point of view, why is it that **anything** should get focused if I click on the shadow host itself? If you take a look at the [color well example](https://github.com/w3c/webcomponents/issues/830#issuecomment-525816320) from @domenic above, let's assume for a second that it isn't a custom element with a shadow root, and instead replace `<color-picker>` with `<div>` and get rid of the shadow root. In that case, clicking on the "frame" or the hash mark before the color label won't focus anything. And that's likely what the user would expect - they just see two interactable controls there, the button and the text. If they click those two, they expect focus. But I wouldn't think they would expect that clicking on the "frame" or the hash mark would randomly focus one of the elements. (They are blissfuly unaware of the shadow DOM, or even the DOM really.) Am I missing something here? Note that this comment really only applies to the user-click use case, and not the `.focus()` programmatic use case. -- 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-531765857
Received on Monday, 16 September 2019 13:00:03 UTC