Design comparison
SolutionDesign
Solution retrospective
My take on the FAQ Accordion Card challenge. Feedback is always welcome. Let me know if there is anything to improve on :)
Community feedback
- @vanzasetiaPosted almost 3 years ago
Hi There! 👋
Congratulations on finishing this challenge! 👏
I have some feedback on this solution:
- Accessibility
- Good job on wrapping all page content with
main
landmark! 👍 - For the decorative images, leave the
alt=""
empty instead. - I would recommend using HTML native elements (
details
andsummary
) to create the accordion. By default, they are accessible so you don't need to do any configuration to make the accordion accessible. - Create a custom
:focus-visible
styling to any interactive elements (button
, links,input
,textarea
). This will make the users can navigate this website using keyboard (by usingTab
key) easily.
- Good job on wrapping all page content with
- Styling
- The color of the text should be black instead of purple color.
- JavaScript
- I would recommend using
querySelectorAll
instead ofgetElementsByClassName
. By doing that, it allows you to useforEach
instead offor loop
and makes your code looks cleaner and modern.
- I would recommend using
That's it! Hopefully, this is helpful! 😁
0 - Accessibility
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