Re: [w3c/webcomponents] tabIndex -1 behaves differently on non-Custom Elements (#774)

@carid: Thanks for this explanation, it does make sense. There is still the following problem though:

The combination of the described tabindex behavior along with the "Keyboad accessible scroll containers" [as implemented here](https://chromium.googlesource.com/chromium/src/+/b64d0a8c04db08eaa81502868a5802d660030842) (which I assume also follow some other spec?) make it impossible to have a CustomElement where its shadowRoot is a scrollable container **and** it's not in the tab order.

Is that not considered a valid use case? Are authors forced to always wrap their contents with a div and add tabindex -1 to achieve that?

@hugoholgersson: Are the scrolling containers changes based on a spec or is it just matching Firefox's behavior but not explicitly specced? Perhaps treating shadowRoots differently in the "keyboard accessible scroll cotnainers" implementation is the right approach here? Such that they are not added in the tab order silently?

> it will become really easy for anyone to create a component without delegatesFocus flag for its shadow

Just a thought about this: Perhaps providing a way for consumers of a component to modify this behavior would alleviate this problem? Even if an author created a "bad" component, consumers could "fix" that behavior on their end, for example `<my-element delegates-focus>...</my-element>`?

-- 
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/774#issuecomment-440905828

Received on Thursday, 22 November 2018 03:59:18 UTC