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

HTML, CSS, JS

@TripleT511

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


I'm having some problems with using images, hope everyone can contribute to have a better solution

Community feedback

@pikapikamart

Posted

Hey, awesome work on this one. Desktop layout looks really great and the mobile state looks really great as well.

I don't see any problems on the image though, have you already finished it?

Some suggestions would be:

  • Remove the overflow: hidden on the main tag. Try inspecting the layout in dev tools at the bottom adjust the height of the dev tools, you will notice you can't scroll on the layout because of that property.
  • Also, avoid using height: 100vh on a large container, it is a bad practice since it limits the element's height based on the remaining screen/viewport's height. But, I tried removing it on this one and the layout really break. Have a go on this again without using that, min-height: 100vh is always better.
  • Add aria-hidden="true" to those images that are decorative so that they will be totally hidden for screen-reader users.
  • Using div for the accordion is not really great since it makes the component not accessible. Right now, only mouse can trigger it and it is excluding lots of users. Instead, use details element. It is suited for accordions and it is accessible.

Aside from those, great job again on this one.

Marked as helpful

1

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