This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: GitHub
- Live Site URL: Interactive Rating Component
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Javascript
- Use
fieldset
to group the radio buttons together - How to style radio buttons with CSS
- Use of
appearance: none
instead ofdisplay: none
to hide the native radio buttons
- Use of
- I was also able to reuse my learnings from the Intro Component with Signup Form challenge here, especially with using
aria-describedby
andaria-live
properties for the error message and Thank-You display
Looking forward to challenges where forms also have custom styling
- Pure CSS Custom Styled Radio Buttons by Stephanie Eckles - This really helped explain how to style radio buttons using CSS without breaking accessibility
- Frontend Mentor - @mbdelarosa
These threads from the Discord server were a big help as I was faced with similar issues and questions: