-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Shadow]: Focus navigation in distributed content #103
Comments
Here is jsfiddle with test case, however it seems, that Chrome implementation ( |
Thank you for the questions. You might want to see the relevant discussions:
No. Unless otherwise mentioned, node trees are implied. I think the spec is clear because it uses a term of "shadow tree" or "parent tree". The current behavior is intentional one. |
Thanks for links. I thought, if it says " the navigation order sequence for a given shadow tree A ", it defines the order of entire tree A in parent tree B, not the order of child nodes of shadow tree ( BTW, links to WHATWG discussion on So if I understood that correctly there is no way to achieve order: I believe, such order would be relevant for the huge set of custom elements. |
Thanks. AFAIK, there is no way to achieve such a composed-tree based navigation order. tabscope is still in the air. I would like to resolve this issue somehow because a composed-tree based navigation order is natural from the user's perspective. I don't want to give it up, however I hasn't spent much time on this issue so far. |
Here's a similar issue filed for Chromium: Current TAB focus navigation is based on tree-of-trees based traversing and Re-defining the focus navigation order of shadow DOM in terms of composed tree focusing
behavior, which is also a valid case of using shadow DOM. |
I would be happy to help somehow. Concrete example will be definitely useful. Regarding wording, I'd like to make sure, I get current spec correctly From discussions you mentioned I understood, that distributed content, from document tree perspective, are child nodes of shadow host, so its navigation order sequence will be added after navigation order sequence of shadow tree nodes. Do I get it right that it's after not before, because of "2. in place of the HOST", and if I make HOST focusable, should shadow tree child nodes be inserted into sequence just after HOST node, and before distributed document tree child nodes, and not after HOST child nodes. In other words: does "1. immediately after HOST, if HOST is focusable;" applies for shadow tree A child nodes as well, but not for insertion point, means
|
@TakayoshiKochi I understand that redefining in terms of composed tree without |
I'm afraid that I don't understand you questions fully. You might want to see a concrete example in Layout Test in Blink, which I've written, until I add a concrete example to the spec. I hope that would help you to understand the spec's intention. |
This example might not be a good example because it uses multiple shadow roots, which you can ignore. |
Thanks for example, it explains a lot. Please disregard my previous question, I just wasn't sure if "HOST" refers to a tree or a node, but specs clearly says "shadow host is an element..". I've made a test for my case: https://gist.github.com/tomalec/3129b2474ff496c75fdc, and line 52 is the one that confused me most in the begging. So the fact that:
What was not so intuitive, that BTW, you have a typo in Blink test |
Thanks.
Totally agreed. I really hope we have a nice solution for this issue in the future. I guess if Web Components becomes widely used, there would be much attentions for this issue.
Thanks. :) |
@tomalec I meant the original bug in https://bugs.webkit.org/show_bug.cgi?id=92050 , If Note on Oct. 7, 2015: edited broken markups |
Let me close this issue. This topic is now being discussed in #375. |
The current Shadow DOM spec at 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
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:
The navigation order should be
1 A 3
And for more complicated case:
The navigation order should be
1 B A 3
, and notA 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.
The text was updated successfully, but these errors were encountered: