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.

ok... but that is not scalable at all if we need to convince browser vendors for every such use case. I'm sure some enjoy the control that gives them but damn... Looks like the primitives need fixing instead?

We add what 1 or 2 new html element every 5 years (I'm ignoring the weird permissions element stuff). That doesn't seem too unreasonable? I agree some stuff (CSS and even JavaScript) does move too fast at times but html is pretty conservative. Fwiw we are doing the primitive that's the focusgroup 1/

0 reposts2 likes

...attribute which I think is the sort of thing you're asking for. It enables the single tab stop arrow-key keyboard behaviour. That's the heavy lift for browsers, but once we have that I see no reason why we shouldn't be able to make first class elements for these things. First rule of aria is 2/

is simplified to "not to use aria". We can't really expect that to work out if we have a bunch of aria roles with no html solution. Obviously we might disagree here but I think we really should be adding toolbar, menu and menubar, tablist and any others we might be missing.

Just want to say I agree with this so much. Not everyone knows how to build custom elements. And the main reason ARIA exists is to provide semantics for things that don't exist in HTML. But, as others have said before me: ARIA should be thought of as a temporary solution.

Assuming all devs will use custom elements (which they don't) & that they all know how to use ARIA (which they don't) & that they all know how to implement the behavior (which they don't) & that that they know WHAT the behavior looks like (which they don't) will only result in more inaccessible code

Yeah html has been far too conservative imo since html5 which was close to 20 years ago. Good to see movement on these complex problems. A custom element _is_ right for this today, but for tomorrow there's an opportunity for a better solution