Design comparison
SolutionDesign
Community feedback
- @deepak-parmarPosted over 2 years ago
@glg-dev, Nice work on the challenge, your design has no flaw at all.
You've used radio input for rating buttons, which I find the best way to implement this component; so kudos to that. 👏
- Your page reloads right after clicking the submit button and
.thanks
section is briefly visible before the page reloads. For that I suggest you usesubmit
event-listener instead ofclick
and prevent submission of the form by usingpreventDefault( )
method ofevent
object and them call thesubmitForm( )
function
submitButton.addEventListener("submit", (event) => { event.preventDefault(); submitForm() }
- Next, for accessibility of the component wrap
.container
and.thanks
elements usingmain
tag and.attribution
element usingfooter
Hope these helps, keep coding! 👍
Marked as helpful0 - Your page reloads right after clicking the submit button and
Please log in to post a comment
Log in with GitHubJoin 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