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

FAQ Accordion Card - JavaScript Accordion

P

@richardcyrus

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


Feedback welcome.

Community feedback

@AgataLiberska

Posted

Hi Richard, well done on this challenge! It's great that you used buttons for the accordion toggle so they're accessible, but it would be good if they had some clear focus styles. The default outline is not showing up, I think it's because of the all: inherit style rule. Maybe to add focus you could use the :focus-within pseudoselector on the h2 elements? You can read more about it here

Hope this helps

0

P

@richardcyrus

Posted

@AgataLiberska Thanks for the feedback. I've added focus styles for the buttons.

0
P
tediko 6,580

@tediko

Posted

Hello, Richard Cyrus! 👋

Good job on this one! Your solution responds well and overall looks good. Here's my suggestion:

  • Try not to repeat your HTML code with image for each arrow. Easier way around is to use pseudo element ::before on your .accordion__trigger element. Set it to position: relative and your pseudo element as position: absolute. Put your image using content: url('image.jpg').

Good luck with that, have fun coding! 💪

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