Hacker News new | ask | show | jobs
by enyo 1235 days ago
Unfortunately there are still plenty of issues with the details element, especially around accessibility. Read more here: https://cloudfour.com/thinks/a-details-element-as-a-burger-m...

Hopefully this will change soon. I’ll amend the article when this will be the case.

3 comments

As someone who actually uses screenreaders and voice control on a daily basis, most of that is not a huge deal. The "a" element has similar accessibility ratings and holes in implementation.
Appreciate you sharing your direct experience!
Would you mind contacting me at the email address in my profile? I’m about to release an open source thing and I would like to understand some accessibility issues.
Referenced in that article is: https://adrianroselli.com/2019/04/details-summary-are-not-in...

Which says JavaScript is required and simplest solution for building this menu. It also states to try to avoid them when possible.

> Which says JavaScript is required

Only if you want to polyfill for pre-2019 browsers

https://caniuse.com/?search=details

You missed the point then. You're probably going to need to use ARIA to attach and toggle the appropriate states in real time and that is only going to work with JavaScript.
I'd be interested in a similar review of client-specific gaps w.r.t the dialog element (which is even newer to the mainstream, i.e. likely the assistive tech has similar/worse implementation lag).