Live data from Hacker News

Accessible hamburger buttons without JavaScript

pausly.app

151–154 of 154 posts

Re: Accessible hamburger buttons without JavaScript

#151

Earlier quoted context omitted.

I'm an accessibility engineer and hamburger menus on mobile are almost always completely inaccessible. A majority of the time they need to be fixed in order to accommodate visually impaired users or users who depend on VoiceOver or other screen reading technologies. Its practically a default issue at this point.

What is the preferred design?

[dead]

Re: Accessible hamburger buttons without JavaScript

#152
post #93

Earlier quoted context omitted.

Not really super important, but thoughts on using an SVG when the same hamburger button affect can be generated with just a tiny bit of HTML/CSS? As little as one element with :before/:after for the top/bottom bars, although sometimes it needs a wrapping element for best styling.

BTW, it's been ::before/::after (pseudo-element, not pseudo-class) since IE9 (2011).

Oh sure, I am aware, just mis-typed it in the comment.

Re: Accessible hamburger buttons without JavaScript

#153
post #92

Earlier quoted context omitted.

Definitely - there's a whole class of stuff related to Progressive Enhancement that is being re-learned (and re-shared) every couple years, it seems like. There was whether CSS was expected to be available. In 2011, it was still being argued whether or not JS could be reliably be expected to be on. Now it's probably more about specific features of CSS/JS depending on browser support, but it's still all basically the…

2013 was the Snowden Leaks which ended up sparking a lot of folks interest and awareness in both security and privacy. This is the time when I and many others started keeping JavaScript off by default and enabling it iff needed. So, yes, please keep your site usable without JS if its purpose is to deliver content+information and not be a web application.

Eh, "many others"? It's about 2% generally, and it's folks who are generally very well aware of how to re-enable it if needed. IMO, JavaScript is a building block of the web and there is no need in 2023 to build without it, even for progressive enhancement. You may have been able to argue that in 2011 +/- but now the average site should be able to assume it will be available if they have some reason to want to use it.

I'm not saying you need to enable it, but that is a choice you are making, and you have the skill to turn it on/off as needed, and realize that there may be sites you won't be able to use without it. I don't think it's a reasonable expectation today that JS may not be available, except maybe to display a nice warning page stating that.

Post reply on HN