Minimal javascript accordions 0 ▲ HTMHell 29 minutes ago · Tech · hide by Justin YarbroughAs a blind screen reader user and accessibility specialist, nothing gets under my skin quite like when I see no JavaScript components talked about like they're the greatest thing since sliced bread. While they may sound simple on the surface, they often use non-standard patterns and create accessibility barriers. That being said, I do believe that we can learn from some of these patterns and take advantage of CSS to minimize the amount of JavaScript needed for a project. Below I'll break down my approach to developing an accordion that uses just a tiny bit of JavaScript and leans heavily on CSS to provide core functionality. Why not just use summary/details? You can create more or less the same functionality as I’ll describe below by simply using the summary and details elements with zero JS, but that’s not really a viable option if you want the button triggering the accordion to have heading semantics. While the MDN article for the summary element states that you… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town