Relatively New Things You Should Know about HTML Heading Into 2025
Not all of this is like absolutely brand spanking new just-dropped-in-2024 stuff. Some of it is, but generally it’s relatively new stuff that’s all pretty great. I’m pointing things out that I think are really worth knowing about. It’s possible you haven’t kept up too much with HTML developments as it tends to, rightfully, move a lot slower than CSS or JavaScript.
A group of details elements can behave like an accordion, among other improvements, but still have accessibility limitations.
We’ve had cross-browser
<details>/<summary>support since 2016, but only recently have the abilities started to expand and clean up.
For one, you can make an “exclusive” accordion by grouping them together via the name attribute:
<details name="group"><summary>One</summary> ... </details>
<details name="group"><summary>At</summary> ... </details>
<details name="group"><summary>A</summary> ... </details>
<details name="group"><summary>Time</summary> ... </details>Me, I mostly think the only-one-open-at-a-time thing is an anti-pattern (as do others), mostly because it’s weird to close something a user may have intentionally opened via side effect. But the web is a big place and certain specific designs I can see needing it to be effective so I don’t hate that it exists. At least I think using the term “accordion” is now appropriate in this context, but that there are still potential accessibility issues. Like imagine using this for a FAQ section where each question would normally be a header like <h3>, well, the semantics of that <h3> is wiped out by the <summary>, which is a “button”, so that’s not great.
Really!
This is a topic that is close to my heart… Take care!
Exactly where are your contact details though?
Here is my web-site – buy cannabis online