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 solution

Cas 210

@iguanasplit

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


Can this really be done entirely on css?! the hover states and everything? i tried entirely on css for days and couldnt do it!

In terms of accesibility how can this be improved or changed? considering questions are normally hidden?

any other general feedback on how to improve is welcome. thanks and have a nice day!

Community feedback

Vanza Setia 27,795

@vanzasetia

Posted

Hi, Cas! 👋

Congratulations on finishing this challenge! 👏

It's possible to style everything with CSS. For me, the most challenging part is to position the box and the illustration. 😅

Here are some suggestions for improvements.

  • I recommend using native HTML elements to create the accordions, details and summary. By default, they are accessible. Also, they have open-and-close functionality. The current accordion is not accessible by keyboard and screen reader.
  • Then, add custom :focus-visible styling to those accordions. This will let people who use a keyboard to navigate the site know where they are currently on the page.
  • If the image is a decorative image, then there should not be any alternative text (alt="").
  • Use the em unit for media queries. It adapts when the users change their font size setting. Here are some references.

I have three recommended videos. The first one tells how hard HTML is (HTML is not easy). The other two talk about modern CSS techniques and approaches.

I hope this helps! Happy coding!

Marked as helpful

3

Cas 210

@iguanasplit

Posted

@vanzasetia

Hi, Vanza!

Thank you very much for the detailed explanation and the resources, i will try to solve it using <details> and <summary> i had no idea there was an element that does this. Ive found it pretty surprising how at first glance HTML seems simple but it isnt, i'll definitely watch the videos! its been very fun and interesting.

Thanks again for the advice, its been really helpful!

0
Vanza Setia 27,795

@vanzasetia

Posted

@iguanasplit Happy to hear that was helpful! 😊

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