Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Dynamic FAQ accordion card

@mathew12tan

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


My first JS challenge! Any feedback is welcomed. Thank you.

Community feedback

@AgataLiberska

Posted

Hi @mathew12tan, congrats on your first JS challenge, well done! Here's what I noticed:

  • it would be good to add some margin on the bottom on mobile devices - on smaller viewports the card reaches right to the bottom of the screen. Adding some space will make it look more professional :)

  • If you use divs as the clickable element, it won't be accessible to keyboard users. Try using a button instead - this is my favourite article about this

  • It would be great if there was some animation/transition to reveal the answer, but the display property is not animatable. One way to work around this would be to create a keyframes animation that animates both display and opacity, or you could just try to toggle between height: 0 to height: max-content;

Hope this helps :)

1

@mathew12tan

Posted

Hi @AgataLiberska,

Thank you very much on your time to comment on my solution.

I edited my code on mobile view, using button for click event, added transition to reveal answer, change my approach on images and minor details..

Thank you again 😊, Mathew

0

@AgataLiberska

Posted

@mathew12tan well done, it looks great!

0

Please log in to post a comment

Log in with GitHub
Discord logo

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