
Solution retrospective
Learned some useful JS methods:
.nextElementSibling
.classList
Please log in to post a comment
Log in with GitHubCommunity feedback
- @noelhoppe
Hi, some suggestions:
div.content
should be<ul>
div.section
should be<li>
div.section-head
should be a<button>
h3
should be<p>
- event should target
<button>
- Use ària-expanded, aria-controls
on
<button>` - Use ària-hidden
on
div.section-details` - Toggle attribute ària-expanded` on click and if (aria-expanded == true) button + div.section-details.classList.remove(hidde).
Marked as helpful
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