Design comparison
Solution retrospective
Hello community, this project was complicated in the Js part because I feel that the code is not quite right, but the functionality is correct, and as for the design, if you can give me suggestions of what I can improve in my Css, I would appreciate it very much, and also my Js code, and html, I think it is correct and semantic, I did not use the details or summary tags, because I wanted a more personal design. And well as always you can tell me anything about my project and Happy coding. ๐งก
Community feedback
- @Tryt4nPosted over 1 year ago
For accessibility you can add
role="region
for everyaccordion__box
because all elements inside are related to each other. Then addaria-expanded="false"
for everyaccordion__head
and handle change state with JS when it's expanded/collapsed. Also for every<p class="accordion__description">
addid
and then for corresponding<div class="accordion__head">
add attributearia-controls="your_id"
.In your case user cannot use keyboard to navigate so there are two options:
- change
div class="accordion-head"
forbutton
- add
role=button
andtabindex="0"
to<div class="accordion__head">
Marked as helpful1 - change
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