@VCarames
Posted
Hey there! 👋 Here are some suggestions to help improve your code:
Regarding your question,
- Your JS should be looking for a
form
submit. - Either option is fine.
- https://moderncss.dev/pure-css-custom-styled-radio-buttons/
- Your HTML should have a
main
element that will assist in identifying the main content of your site. In this, case themain
element would be wrapping the entire component.
More Info:📚
- To ensure that the "rating buttons" are fully accessible, they need to be built using 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](https://developer.mozilla.or
- Currently, users can submit without selecting a rating. To fix this, you can do one of the following:
- Make the “5” rating the default rating.
- Create an error message, telling users they need make a section.
- Disable the button until a selection is made.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding!🎄🎁
Marked as helpful