Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive rating component challenge on Frontend Mentor using HTML C

P
Ravi Bele 170

@RaviBele

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

T
Grace 29,310

@grace-snow

Posted

I'm afraid you need to rewrite the html on this one. This is a challenge where there really is only one correct approach for the markup. This must be a form and use radio inputs. Ideally they need to be in a fieldset with a legend, or a wrapping div with role of "radiogroup" and an aria-labelledby pointing to the headings ID.

The bad news is that changing the html will break your styles and javascript.

But the good news is the js will become way more simple. This only needs a single form submit event listener, and you can get the chosen value from the form data. For example if the radios have a name of "rating" you would get the value with form.rating.value.

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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