Responsive FAQ Accordion

Solution retrospective
I would greatly appreciate any feedback that you may have!
Wanted to build something simple and stumbled upon this challenge :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @bbsmoothdev
Hey, just a few quick issues. You can't have spaces in your
id
values. Soid="Question 1"
needs to beid="Question1"
. Also, I see you are using thearia-controls
attribute on eachbutton
to associate the button with the paragraph it toggles, which is great, but you forgot an even more important aria attribute,aria-expanded
. This attribute goes on thebutton
, not thep
element. When the content is not showing then it should bearia-expanded="false"
. When the content is showing then it should bearia-expanded="true"
.Marked as helpful - @AdeMEDIA
Nice one mate, Keep it up
Join 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