4 ms·
This proposes to add expanding accordions to the navbar and to some pages. Will these work without JavaScript?
by hlandau 5y ago
This proposes to add expanding accordions to the navbar and to some pages. Will these work without JavaScript?
- thepangolino 5y agoDefault behaviour should be that everything is expanded.
- hadrien01 5y agoThe way the BBC does it is putting a second menu in the footer, and linking to it for NoScript users.
- comex 5y agoIdeally they would use a styled <details> element, which provides exactly the desired behavior without needing JavaScript. Edit: At least, exactly the desired behavior for accordions within the page, where, once you expand a section, you expect it to close again only if you click the section header a second time. It would be less suited for a dropdown menu, which needs to be dismissed if the user clicks anywhere else on the page - though there might be some way to make it work.
- Cthulhu_ 5y agoIIRC it's possible to make a menu like that nowadays without JS, just pure html + css.
- celticninja 5y agoGDS style/rules require an alternative where JavaScript is disabled, so I would expect this has been considered.