una/YouMightNotNeedJS

Accordion does not even need css trickery: <details> <summary> tags

pke opened this issue · 2 comments

pke commented

The HTML <details> and <summary> tags will do just fine.

FAQ Example (can even be nested)

What is 42

The answer.

Where do we come from

There is no answer to that.

An accordion requires only one element to be open. That is, the current open tag must close if you open another.

But I would add another separate example with details because very few people really know about this tag.

3 years, and still not added