web components and tabindex encapsulation

289 views
Skip to first unread message

Matthew Butler

unread,
Jan 24, 2014, 11:24:03 AM1/24/14
to polym...@googlegroups.com
Hi Folks,

Long time listener, first time caller ;-) I'm working on a project in the dart version of Polymer but I think my question applies to web components in general and is not Dart specific. Are there any plans or perhaps work-arounds for tabindexing. Currently I have a component which in itself is a form with fields that contain tabindexes. And on its own it works great. However it appears that tabindexes break encapsulation of the component as when I have multiple instances of the component loaded, instead of respecting the tabindex on a component by component basis, it will instead navigate by hitting each tabindex=1 on the page, then each 2, etc. 

Is my only option to completely re-layout my inputs so they are declared in the desired tabindex order and just drop the attribute altogether? Is there another work around or the chance of this being considered as something which will be added to the shadow dom of an object.

See my related SO question here:

Thanks for any feedback you can provide.

Matt

Hayato Ito

unread,
Jan 27, 2014, 9:03:38 PM1/27/14
to Matthew Butler, polymer-dev
You might want to see a '7.2 Focus Navigation' in the Shadow DOM spec.

Tabindex should be *scoped* in each node tree.


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/de260af0-8a75-4fb8-8efc-3d737e078395%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Hayato

Hayato Ito

unread,
Jan 27, 2014, 9:06:57 PM1/27/14
to Matthew Butler, polymer-dev
Blink already supports that. If you find any unexpected behavior, please let me know that.

--
Hayato

Bobby Powers

unread,
Jan 27, 2014, 9:22:08 PM1/27/14
to Matthew Butler, polym...@googlegroups.com

Hi Matthew,

Are you seeing this with the polyfill or native chrome shadowdom?

Follow Polymer on Google+: plus.google.com/107187849809354688692

Matthew Butler

unread,
Jan 28, 2014, 8:31:21 AM1/28/14
to polym...@googlegroups.com, Matthew Butler


On Monday, January 27, 2014 10:03:38 PM UTC-4, Hayato Ito wrote:
You might want to see a '7.2 Focus Navigation' in the Shadow DOM spec.

Tabindex should be *scoped* in each node tree.

Thanks for the info!
--
Hayato

Bobby Powers
Hi Matthew,
Are you seeing this with the polyfill or native chrome shadowdom? 

Looking now, it appears that this is with the polyfill (in particular the ones generated by the dart2js compiler, which I believe I also a mix of the Polymer.js polyfills). I'll try some experiments today to ensure I don't see the same behaviour in native chrome shadowdom.

Thanks for the feedback!

Matt

Rob Dodson

unread,
Jan 28, 2014, 5:27:24 PM1/28/14
to Matthew Butler, polymer-dev
I just tried with native shadow dom and I saw the expected, scoped, behavior.


Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages