@VCarames
Posted
Hey there! š Here are some suggestions to help improve your code:
Unfortunately the HTML for the rating part needs to be rewritten as it was done incorrectly.
To ensure the ratings are fully accessible to all users and are built with the proper elements, the entire rating part needs to be built using a form
element.
- Wrap all elements within a
fieldset
, which will contain a visually hiddenlegend
using CSS. - Within the
fieldset
, include five (5)input radio
elements, each associated with a correspondinglabel
to enhance the accessibility of the "ratings." - Lastly, include a
button
to allow users to submit their selection.
After implementing the above changes, for your JS, the eventListener
should be attached to the form
element, listening for a submit
event.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! š¾