Hacker News new | ask | show | jobs
by mariusor 1235 days ago
You should still wrap the list in a <nav> element to give the browser the context about what the menu represents.
1 comments

Also, while details/summary support in browsers and other user agents and tools is improving over time, it is still not perfect for ... nearly anything. Sadly.

https://adrianroselli.com/2019/04/details-summary-are-not-in...

Perfect is the enemy of the good. It's a reasonable general purpose choice. Of course don't use it if you have stricter requirements.
worth pointing out that the link is almost 4 years old - which is an age, for browsers. Things might be better now (I've not tried).
FWIW This article is almost 4 years old. When it was written 3 years hadn’t passed since Firefox had full support in Firefox 48. Meaning that more time has passed since this article was published then the time between Firefox support and the publication.
Yes, yet last update was last year and coincidentally mentions article "A details element as a burger menu is not accessible" Published on September 20th, 2022:

https://cloudfour.com/thinks/a-details-element-as-a-burger-m...

I don’t think we should take this article at face value. Putting a heading <h2> inside the <summary> is weird and the aforementioned article recommends against it (most experienced web devs know not to put headings inside interactive elements other then <a>).

On top of that we have people in this threat that use screen readers and claim that they have no problems with <details>/<summary> which aren’t present in other elements[1].

1: https://news.ycombinator.com/item?id=34547915