Post

Initial prototype of a `<toolbar>` element is coming along. Largely piggybacks off the focusgroup code so it's actually quite simple to do. Lots to discuss and tweak before it's finished but got to start somewhere.

It's built into the browser? Handling the keyboard behaviour automatically is a pretty big win over using a JS library for it, imo. Focusgroup has actually quite complex conflict handling for if you say put an input inside a toolbar. Doing this in a custom element would be quite a pain.

slightly off topic but what does happen when you put an element that shouldn't infer an implicit role inside the widget (like the input inside the toolbar or a link inside a tablist or something)?

They keep their intrinsic roles. I don't believe toolbar implies any, but tablist for example will set buttons to tab but most other items won't change role. Buttons was a recent change originally anything with its own role kept it, but I believe it was Sarah pointed out buttons really shouldnt.

What about keyboard navigation? do the elements participate in the focus group/arrow key navigation? I know this has been in discussion but I don't know if there has been a final decision on this

Yes they do provided they're already keyboard focusable, though there's behaviour to handle key conflicts. So the input for example you can arrow into it but then you'll need to tab out and it makes sure there's no part of the focusgroup you're prevented from getting to.

0 reposts3 likes