Design comparison
SolutionDesign
Community feedback
- @Mubarak-AdeyemiPosted about 2 months ago
-
JavaScript Refinement: Rating Selection Validation: Ensure users can't submit without selecting a rating. You can add a simple validation to check if any radio button is selected before showing the success message.
-
CSS Refinement: Radio Button Accessibility: The
input
should have better focus states for keyboard accessibility. Consider adding a:focus
style to labels for users navigating via the keyboard. -
Simplifying the Success Message:
- Instead of hiding and showing sections with
style.display
, consider usingclassList.toggle
to add a class likehidden
to simplify the logic and maintain better readability in your JavaScript.
- File Separation:
- While embedding styles and scripts in the HTML works for small projects, separating CSS and JS into their own files is good for scalability and maintainability.
Marked as helpful0 -
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