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 solution

@zp021

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I wasn't sure if I should use just buttons or a <form> for this challenge. I used the buttons for simplicity, but if its better practice to use a form let me know. I also wanted to validate that a rating was selected before the user can submit. I'm not sure if that was part of the challenge, but that was one of the first things I thought about. I initially tried to validate the value through JS, than maybe alert the user to select a rating before submitting, but couldn't get it to work, so I opted for making the submit button inaccessible until a rating was selected. That I figured out by googling, and if there is a better way, please let me know since this is my first JS challenge. I'm also concerned about accessibility, and that makes me think a <form> with <input> and <label> would've been a better choice.

Community feedback

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