Design comparison
Solution retrospective
Thank you for taking the time to review this front-end coding challenge.
For this challenge, I followed a YouTube tutorial by Seer Studio to learn how to implement an accordion function using JavaScript. Since I am new to JavaScript, the tutorial was helpful in teaching me the necessary skills. Moving forward, I plan to explore more advanced topics and experiment with different techniques for creating an accordion function.
Alongside learning about the accordion element, I also gained knowledge about positioning elements using the "position: relative" property. This included understanding how to position an image relative to its parent container and how to place an object at a specific point on the page using the "transform: translate" property. Additionally, I learned how to adjust the image size uniformly and make it responsive to different screen sizes.
You can view the challenge here FAQ accordion card challenge on Frontend Mentor
Built with
- Semantic HTML5 markup
- CSS custom properties
- CSS Grid
- Mobile-first workflow
Author
Coded by @kirawesh
Community feedback
- @vanzasetiaPosted over 1 year ago
Hi, Kira Weizman Shapira! 👋
I recommend using native HTML elements for the accordions, using
<details>
and<summary>
tags. Right now, the accordion is not accessible with the keyboard. I can't interact with them usingTab
andEnter
keys.Also, the accordions are not using interactive elements. You should use
<button>
elements witharia-expanded
attributes for the custom accordion. Remember to always use interactive elements for elements that have interactivity.The accordions are not a list.
The arrow icons are decorative images. You should leave the alternative text blank.
For your information, decorative images are images that don't add any information and serve only aesthetic purposes.
For the tutorial, I recommend using it as a reference rather than following along. Most Frontend Mentor tutorials are made by people who are still learning. So, you should not be satisfied with their code. You should try to improve the code.
I recommend swapping all the
<section>
elements with<div>
elements. For your information,<section>
without a label has no meaning. In short, it is the same as<div>
.Reference: WebAIM: HTML Semantics and Accessibility Cheat Sheet
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