New HTML element idea! Developer feedback wanted


Remember when the <main> tag was just an idea? It later turned into an actual HTML element, mostly for structural and accessibility reasons.

There’s a new idea out there: panels. In order to be fleshed out, this idea needs developer input, by developers trying some proposals out.

The TL;DR is, Go Check These Out.

The longer story:

Brian Kardell, Léonie Watson, Steve Faulkner and Chaals McCathie Nevile were discussing how there’s these sets of things developers keep building, which have similar structure and behaviour, but need a boatload of JS and CSS to change their forms in responsive layouts (tab-panels to accordion for example) and need a lot of manual ARIA markup added them them plus Javascripted interactions to match the ARIA stuff.

As Deathshadow used to say around here, the more code there is, the more there is to break. That also fits complexity: the more complex stuff a developer has to write by hand, the more likely a mistake appears and breaks the whole thing (with the accessibility stuff, it would break without the dev necessarily realising it). Since the idea is that many of these things are just variations of the same single structure, are incredibly common and nowadays with ARIA and keyboard demands so easy to screw up (or hard to adjust for responsive design if you grab something off-the-shelf like a UI library), that maybe this should become part of the HTML standard the way <main> did.

This is not a spec proposal, but whatever it’s called before it even gets to that stage. More like the what-if stage, but then to get ideas and flesh out do’s and don’ts. How the hell do you spell don’t’s?

The link above goes to the discussion page which also links to a demo page with “prollyfills”, so you can see what these things would be and how they would act.

1 Like

It’s a interesting idea. I gave the demos a go and raised an issue for them on the expected functionality. Hopefully that’s helpful. Always useful to have fresh eyes.

Interesting, I actually started writing about something similar, but using tag attributes -

I’ve always thought that the more common types of basic interactions like accordions/toggle, that currently rely on Javascript, should be bought into HTML - imagine how the reduced reliance on JS could help speed up the web?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.