- From: Hayato Ito <notifications@github.com>
- Date: Fri, 30 Aug 2019 02:13:11 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 30 August 2019 09:13:33 UTC
It's still unclear to me why the first clickable element is better.
Could someone explain what would happen if the first clickable element is assigned to a slot?
Has someone considered this case before proposing a new behavior?
For example, given the following tree of trees:
```
host-1 (delegatesFcus=true)
└──/shadowroot
└── host-2 (non-focusable element)
├──/shadowroot
│ ├── slot name=slot1
│ └── slot name=slot2
├── clickable-element2 slot=slot2
└── clickable-element1 slot=slot1
```
Then, the flat tree would be:
```
host-1
└── host-2
├── clickable-element1 slot=slot1
└── clickable-element2 slot=slot2
```
- If an end user clicks host-1, an end user's expectation is clickable-element1 gets focused, I think.
I think the current behavior focuses clickable-element1, right?
- If we always choose the first element in the shadow tree, ignoring slot assigments at all,
we will focus clickable-element2. Is that fine?
I think the current behavior is not perfect, but it works in most cases, handling this case too.
--
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-526527168
Received on Friday, 30 August 2019 09:13:33 UTC