FAQ accordion | SCSS, Vite

Solution retrospective
I learned about the accordion pattern. It was very rewarding to test the solution with a keyboard and focus on the accessibility parts.
I'm happy to have implemented a no-script behaviour. It works when you disable javaScript and refresh the page.
What challenges did you encounter, and how did you overcome them?Understanding the accessible disclosure requirement and switching the correct aria attributes based on interaction.
The documentation from APG is a bit complex on the javaScript part.
Grace post about this topic helped a lot - https://fedmentor.dev/posts/disclosure-ui/
What specific areas of your project would you like help with?How would you add animation to this solution, without changing to much the current code.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@kaamiik
Hi. Congrats for doing this. I used
animation
andkeyframes
. UsingtranslateX
andscale
together withopacity
. But I noticed now that It works only one time :)) Don't know why - @xNyfPtx
Doesn't work for me when I disable Javascript on Firefox using uBlock Origin. Maybe adding a
transform: translateY(100%)
and addingoverflow-y: hidden
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