Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

FAQ ACCORDION CARD with Flexbox, Javascript

Ken•935
@kenreibman
A solution to the FAQ accordion card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This took me three days... Javascript took the longest but i definitely learned a lot more from this project compared to the others.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Ken•4,915
    @kens-visuals
    Posted over 3 years ago

    Hey @lmaoken 👋🏻 it's Ken 😅

    I've got some suggestions to help you fix the accessibility and HTML issues.

    • In your markup, <section class="card">...</section> should be <main class="card">...</main>. This will fix the accessibility issues. Don't forget to generate a new repot once you fix the issues.
    • Instead of <section>, I suggest using regular <div> for a couple of reasons. First, when you use a <section> you have to have a heading, like h1-h6. Next, <section> is for bigger parts of layout, such as, contact us about us, image gallery, etc.
    • Also, the following to images should have aria-hidden="true" like so:
    <img src="images/illustration-woman-online-desktop.svg" aria-hidden="true">
    <img src="images/illustration-box-desktop.svg" aria-hidden="true">
    

    because they are for decorative purposes only. You can read more about aria-hidden here.

    I hope this was helpful 👨🏻‍💻 you did a superb job, especially with responsiveness. Well done, keep it up. Cheers 👾

    Marked as helpful
  • Ken•935
    @kenreibman
    Posted over 3 years ago

    LIVE VERSION IS UPDATED TO HAVE BETTER VISUALS AND IMPROVED SIZING. -- If I ever get PRO I'll update the screenshot.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub