Design comparison
Solution retrospective
Hello π,
This is my solution for the interactive rating component challenge. π¨βπ»
This was my first time completing a challenge with JS. I learned the importance of script placement within HTML.
Thank you for taking the time to view my solution, and for any feedback provided!
Community feedback
- @VCaramesPosted over 1 year ago
Hey there! π Here is some feedback to further improve your code:
- The HTML for the ratings needs to be rewritten as it was done incorrectly β:
To ensure that the "rating buttons" are fully accessible π―, they need to be built using a
form
β οΈ.- Everything will be wrapped inside a
fieldset
which will have alegend
that is visually hidden using CSS. - Inside, there should be five
input radios
and eachinput
should have alabel
attached to it to make the βratingsβ accessible. - The last thing you will want to include will be a
button
so users can submit their choice.
More Info: π
- Once the top is implemented , for your JS, the
eventListener
should be on theform
β οΈ as asubmit
.
More Info:π
Click vs. Submit EventListeners
- Currently, you "thank you" content is not being announced β οΈ to screen readers. So you need to wrap it it in another
div
and give it aaria-live="polite"
(it should only have this and nothing more).
- The
h4
in your "thank you" content should be ap
instead, since it is not a heading.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! πΎ
Marked as helpful0
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