News for hackers. Stuff that matters.
Re:Accessible hamburger buttons without JavaScript by warp on Friday January 27, 2023 @10:56AM (#34547441)
You can do this:

    <a href="#something"><button>menu</button></a>
Or maybe:

    <form action="#something"><button type="submit">menu</button></form>
Not sure either of those options are better than the original post though :)
Re:Accessible hamburger buttons without JavaScript by exogen on Friday January 27, 2023 @12:34PM (#34549002)
The latter would probably work, but the first is invalid HTML – you can't nest interactive elements. Will browsers allow it? Yes. But it's still invalid per the spec.