Replies: 1 comment 5 replies
-
Great thoughts on the topic @garyb1! I've been looking around a bit online on what types of solutions are valid for this. Seems like pretty recently it's possible to detect if the user has JavaScript disabled with a CSS media query, quite interesting: https://www.stefanjudis.com/blog/how-to-detect-disabled-javascript-in-css/. You could use that to open the accordions if that's the case. Although I don't have the exact statistics there are very very few users who have JavaScript disabled. And since accessibility relies quite a bit on JavaScript being enabled (modals, focus traps, keyboard navigation, menu dropdows, toggle buttons) it would be near impossible to provide alternatives for those use cases. I think it's save to assume that people who need assistive technology have JavaScript enabled by default to make the most of us programmers who put in the effort to make our websites as accessible as possible. I do like the thought of progressive enhancement but I don't know how valid it is in this case 🤔 Although it wouldn't hurt implementing those media queries 😄 |
Beta Was this translation helpful? Give feedback.
-
I'm relatively new to Astro. I had created Issue #70 for this but wanted to ask here in the discussions.
The idea was that we could expose the heading and the content if JS was turned off. Then enhance that when JS is enabled by using the accordion pattern?
Beta Was this translation helpful? Give feedback.
All reactions