5 ms·
Why does documentation need any JavaScript at all beyond opening the hamburger menu?
by earthboundkid 3y ago
Why does documentation need any JavaScript at all beyond opening the hamburger menu?
- replwoacause 3y agoWhy does it even need a hamburger menu?
- sgc 3y agoBecause you need to hide nav on mobile, since accessibility requirements from google and other web crawlers will require it to fill the much of the page, or your site won't be indexed.
- yawaramin 3y agoYou don't need JavaScript for a hamburger menu, I am doing it with pure HTML. Hint: the <details> tag.
- earthboundkid 3y agoHint: that’s bad for accessibility.
- yawaramin 3y agoHint: there's nothing inherently inaccessible about the <details> tag, it all depends on how you use it.
- bmacho 3y agoNo need for javascript for the hamburger menu, it is doable with CSS checkbox, see for example the hamburger menu on https://lanyon.getpoole.com/ https://lanyon.getpoole.com/ . Or another example, the teddit reddit-frontend has collapseable threads with the summary/details tags, also works without javascript.
- earthboundkid 3y agoThe CSS checkbox method is considered bad for accessibility. They’re adding a popover attribute to use for no JS menus instead.