FAQ accordion (Tailwind CSS)

Solution retrospective
Hi there 👋, I’m Melvin, and this is my solution for this challenge. 🚀
🎁 Features:
- Achieved 100% in Lighthouse score for performance, accessibility, best practices, and SEO. 📊
- Progressive Web App (PWA) support. 📱🌐
- Utilized TailwindCSS for responsive styling. 🎨
- Codebase is well-maintained and formatted using Prettier. 💻
- Resemblance with the original design. 🎨
- No media queries were used. 📱
- Integrated very small animation. ✨
💻 Two Solutions in Two Branches:
- Native HTML Solution: Utilizing
<details>
and<summary>
tags without the need for JavaScript. 🚀 - Accessible Disclosure Solution: Implementing Accessible Disclosure with a11y in mind for enhanced accessibility. 🌐
🛠️ Built With:
- TailwindCSS. 🎨
- npm - prettier - prettier-plugin-tailwindcss. 💻
-
📚 Further Resources:
If you're interested in creating an Accessible Disclosure, I recommend checking out this informative article by Grace Snow: Tutorial: Let's Build an Accessible Disclosure
Any suggestions on how I can enhance this solution or achieve even better performance are welcome!
Thank you. 😊✌️
Please log in to post a comment
Log in with GitHubCommunity feedback
- @javascriptor1
Hi Melvin,
Excellent solution as always. Your native solution draws my attention to the fact that CSS selectors like:
:is and :not can work as if condition combined with HTML attributes which makes it possible to get rid of JS code when you have two options to choose from.
Thanks for your excellent contribution to FEM. I enjoy looking at your code always.
Regards, MKF
- @yogiazy
Thanks! 👋 I've learned new features from your solution.
- @Finney06
Isn't the button meant to close when another button is been click...?
- P@DalaScript
Hey, Welll done!!
May I ask you, How do you write Solution retrospective, without this 3 questions and with your own title?
Thanks in Advance.
- @websalem
wow, perfect
- @SamehCode
what about the main idea of accordion ? when select a topic the rest of topics must be not visible
https://getbootstrap.com/docs/5.3/components/accordion/
search for accordion to get the main idea
i've added link for you from bootstrap accordion check it out
- @javascriptor1
I also forgot to mention I could not see the thin line in your solution between questions.
I wonder how do you solve this usually? do you use <hr> tag? or border-bottom? Or other approaches?
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