Design comparison
Solution retrospective
Was this one difficult for you? This one appeared much more time consuming for me. It seemed like the next difficulty level, not the "easiest". Was it the same for you or just my JS skills need significant improvement?
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi, Givi! 👋
This challenge is straightforward if you use the native HTML element -
summary
anddetails
tags to create the accordion. After that, for JavaScript, all you need to do is to prevent the users to open more than one accordion panel.Also, it is important to know to never use non-interactive elements to create something that has interactivity. In this case, you should not use
p
element for the accordion. That's because it will not be accessible by keyboard users and won't be pronounced correctly by screen readers.Lastly, never limit the height of the
body
element. It will not allow the users to scroll the page if the page content needs moreheight
. You can see the issue by looking at the site on a mobile landscape view. So, my recommendation is to usemin-height
instead.I hope this helps! Happy coding!
0
Please log in to post a comment
Log in with GitHubJoin 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