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 using plain HTML, CSS, and JS

Kenny Putmanβ€’ 40

@kennyputman

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


Any feedback is greatly appreciated.

I feel like I spent a lot of time using absolute positioning on this one. Is there a better solution to this?

Community feedback

Agustinβ€’ 340

@agusc01

Posted

Hi Kenny, nice work ! . Try to use more relative units than absolute units (try to remove "px")

Anyway it's a wonderful challenge. Keep coding

1
Vanza Setiaβ€’ 27,795

@vanzasetia

Posted

Hello, Kenny! πŸ‘‹

Good job on this challenge! Your solution looks pretty good! It's good to know that you are leaving all the alt empty for all decorative images. By doing that, you make the users of the screen reader focus on listening to the content.

About the absolute positioning, I also did position the illustrations using that method. It took some guessing to position the images. Anyway, you have done a great job on this one! It looks similar compared to the design, so don't worry about it. πŸ˜‰

There are two things that I would highly recommend doing.

  • I would recommend using the native HTML elements for the accordion elements, summary and details elements (they are accessible by default). Currently, by using div, I can't control the accordion panel using the keyboard and the screen reader can't tell that it is an interactive element.
  • I would suggest using the rem or sometimes em units instead of px. Using px would not allow the user to control the size of the elements based on their needs.

Overall, you have done great work. It's great that you already know that not all images need alternative text, in this case, all images are decorative and if you are using the native HTML elements to create the accordion, that would make your site more accessible than how it is.

That's it! Hope this helps. 😊

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