-
Notifications
You must be signed in to change notification settings - Fork 81
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
leverage ShadowDOM v1 + tabindex=-1 for inertness #48
Comments
Tested in STP and Chrome and it works 🎉 http://jsbin.com/lizipoq/2/edit?html,output |
sounds like a great idea to me. @valdrinkoshi do you have any interest in putting together a PR for it? |
sure i can give it a shot. |
hm... I think I'm cool with dropping v0. @alice wdyt? |
Works for me - it's no longer implemented anywhere, right?
…On Thu, Mar 23, 2017 at 1:28 PM, Rob Dodson ***@***.***> wrote:
hm... I think I'm cool with dropping v0. @alice <https://github.com/alice>
wdyt?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#48 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFz6NymIgNNwIaZDzAJRJ7vgcJhnFAXks5rodjCgaJpZM4MYzbZ>
.
|
ehhhh.... it's in Chrome and will be for quite some time... |
Yeah, and that makes things harder, as we can't know if a Apart of this problem, even if we focus only on shadowDOM v1 in chrome, we have the following challenges:
Will try to deliver something on the basis that ShadowDOM v1 is natively supported, and see how good/bad it is compared to what we have currently 👌 |
From step 3 of https://w3c.github.io/webcomponents/spec/shadow/#sequential-focus-navigation
Which in other words means that if an element has tabindex=-1 and a shadowRoot, the focus won't be able to reach the element's contents (distributed or not) 🎉
The
inert
polyfill could leverage this behavior for a faster performance, e.g. just set the tabindex to elements that have a shadowRoot w/o traversing them.Another (more invasive) way to achieve inertness is to set a shadow root to the top element to be inerted, without traversing its content, e.g.
Update: it is still possible to programmatically focus the content (e.g.
el.querySelector('button').focus()
), so we might still need to traverse the content to override focus@alice @robdodson WDYT?
The text was updated successfully, but these errors were encountered: