[webcomponents] [Shadow]: Focus navigation in distributed content (#103)

The current [Shadow DOM spec](https://github.com/w3c/webcomponents/blob/3788bdcbe96feb06553e9639554a52725ef9255e/spec/shadow/index.html#L1003) at [Focus navigation](http://w3c.github.io/webcomponents/spec/shadow/#focus-navigation) does not specify how shadow tree nodes align to distributed ones, it only defines where entire tree is inserted. It's also not clearly stated to which tree (_document tree_ or _composed tree_) _sequential focus navigation_ should apply in general.
It says
>If a node doesn’t participate in the composed tree, the node must be skipped from the navigation order..
therefore I assume that it applies 

Therefore, I assume it should be applied to _composed_.

If it is applied to composed then it should be possible to place real light DOM nodes in between _shadow tree_ nodes, and according to the order of _shadow tree_.

So for the case:
```
document tree
|-shadow host
  |-A focusable

shadow tree
|-1 focusable
|-2
  |-A insertion point
|-3 focusable

which gives

composed tree
|-shadow host
  |-1 focusable
  |-2
    |-A focusable
  |-3 focusable
```
The navigation order should be `1 A 3`

And for more complicated case:

```
document tree
|-shadow host
  |-A focusable
  |-B focusable

shadow tree
|-1 focusable
|-2
  |-B insertion point
|-3
  |-A insertion point
|-4 focusable

which gives

composed tree
|-shadow host
  |-1 focusable
  |-2
    |-B focusable
  |-3
    |-A focusable
  |-4 focusable
```
The navigation order should be `1 B A 3`, and **not** `A B` as if it would be for document tree.

Did I get the spec right?

Anyways I would say that it deserves detailed spec. And I would vote for such solution, as otherwise I do not see how Custom Element developer could use distributed content without breaking accessibility.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/103

Received on Wednesday, 27 May 2015 15:52:26 UTC