News for hackers. Stuff that matters.
Re:Accessible hamburger buttons without JavaScript by zichy on Friday January 27, 2023 @12:18PM (#34548714)
Those "toggle buttons without JavaScript" are one of my pet peeves. It's always the same thing:

1. Someone finds out that you can use `:checked`.

2. They add some JavaScript to "enhance" their idea.

3. It's still less accessible than a proper implementation.

This example is a CSS hack and not something you would actually want to use in a production environment. JavaScript is absolutely necessary if you are developing a custom interactive element. If `<details>` works for you, fine. If it doesn't, you might want to look up ARIA attributes.

Re:Accessible hamburger buttons without JavaScript by enyo on Friday January 27, 2023 @01:32PM (#34549823)
You didn't actually say anything other than that it's bad and not to use on production. Care to elaborate?