interactive rating component with css flexbox and vanilla js
Design comparison
Community feedback
- @VCaramesPosted almost 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
- The proper way to build the "rating buttons" in this challenge is to create a
form
and inside of it, there should be fiveinput radios
and eachinput
should have alabel
attached to it to make the buttons accessible. Finally wrap all theinputs
andlabels
inside afieldset
to prevent users from making more than one selection.
More Info:📚
MDN <fieldset>: The Field Set element
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!🎄🎁
Marked as helpful0@red0ahlamPosted almost 2 years ago@vcarames thank you so much for your feedback. I have implemented your advice in the code in what I believe to be a correct way. if you have any more observations please let me know, I would very much appreciate it. and thank you again very much.
0 - The proper way to build the "rating buttons" in this challenge is to create a
- @KathrynDavies123Posted almost 2 years ago
Hi!
First of all nice job on this :)
One thing you should consider adding is some kind of restriction on the submit button, since at the moment the form can be submitted without any rating number being selected. This takes the user to the second screen and the part where the rating should be is empty.
Good luck, and let me know if you get stuck!
Kathryn
Marked as helpful0@red0ahlamPosted almost 2 years ago@KathrynDavies123 thank you for bringing it to my attention, I didn't even consider that possibility lol. I've fixed the issue now so that an error message shows up instead. thank you again sooo much :)
1
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