Responsive FAQ Accordion Without Javascript
Design comparison
Solution retrospective
Hello everyone 👋,
This is my take on the FAQ Accordion, I've built it using sass
and with no use of javascript
.
As always, thanks for your feedback 🙏
Community feedback
- @RenszCamachoPosted almost 4 years ago
Hello, my friend. You have some Htms issues. Check your report.
this lady @grace-snow gave me this tip.
"One real enhancement would be to add keyboard functionality. The easiest way to make your solution accessible would be to use a button as the trigger. That means you'd not have the questions in a paragraph, but they could be in a span inside a button. That would give you full keyboard interactivity and focus very easily."
That helped me a lot. So if that helps you. You can give her an upvote here
2@grace-snowPosted almost 4 years agoThanks @RenszCamacho! I haven't actually tried this solution and am away from my computer. It might be that this checkbox method is fully accessible already, but I'd have to test it with my keyboard and screenreader. All depends on how that input is hidden and whether extra aria-attributes are needed to link the question with its answer (aria-describedby perhaps)
Swapping some divs for spans will fix all those html validation issues ☺
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord