@sandro21-glitch
Posted
Hi Name
Here are few suggestions to improve the code
Add aria-labels to the buttons to improve accessibility. For example, you can add aria-label="Submit rating" to the submit button.
Use const instead of let when declaring a variable that won't be reassigned.
Add comments to explain what the code does.
Happy Coding
@Mr-jaw
Posted
@sandro21-glitch Thanks for the review 😊
yes i forgot to add comments. next time i'll do it.
@Mr-jaw I'm afraid you need to change this. It must not be a load of buttons. This must be a form with a fieldset of radio inputs; with js listening for form submit. Once that's done the js will need to change. This challenge only needs a few lines as most is handled by default form behaviour.
You also need to prevent submission if the user has not chosen a rating yet.
@Mr-jaw
Posted
@grace-snow
Noted
thanks for pointing out 😊 I'll look into it