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 (React)

Anna 545

@NitaLewska

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


This is my first React project here, any advice is welcome!

Community feedback

Adriano 37,910

@AdrianoEscarabote

Posted

Hi Anna, how are you?

I really liked the result of your project, but I have some tips that I think you will enjoy:

To let users know that an element is clickable, use the cursor: pointer; property on the element you want!

To improve the structure of your code, wrap all the content with the main tag, in addition it also means the main content of your page! as this challenge is just one component, we can involve the entire content!

The rest is great!

I hope it helps... 👍

Marked as helpful

1

Anna 545

@NitaLewska

Posted

@AdrianoEscarabote Thank you! I've added the cursor: pointer; property! I think I'll refactor this project in a bit, thank you for your advice! =)

1
Adriano 37,910

@AdrianoEscarabote

Posted

@NitaLewska happy coding!!

1

@VCarames

Posted

Hey there! 👋 Here are some suggestions to help improve your code:

  • Change width to max-width in your component’s container to make it responsive. You will also want to delete the height as it is unnecessary.
  • The “icons/images” in this component serve no other purpose then to be decorative; They add no value. There Alt Tag should be left blank and have an aria-hidden=“true” to hide them from assistive technology.

More Info:📚

https://www.w3.org/WAI/tutorials/images/

  • Add a cursor: pointer to the rating buttons to improve users experience.
  • The proper way to build this challenge is to create a Form and inside of it, the “rating buttons” should be built using an Input Radio (wrap all of them inside a Fieldset), since this will prevent additional buttons from being active at the same time, and it should have a Label element attached to it for accessibility.

More Info:📚

MDN <input type="radio">

MDN <fieldset>: The Field Set element

If you have any questions or need further clarification, feel free to reach out to me.

Happy Coding! 🍂🦃

Marked as helpful

1

Anna 545

@NitaLewska

Posted

@vcarames Hi! Thanks for your advice!

  1. I've added the cursor: pointer; property!
  2. I haven't even thought about radio buttons for some unknown reason, I've forgotten about them! Thank you a lot, I'll refactor this!
  3. I'm really awful with ARIA and accessibility stuff, it always feels not so important. I really need to start paying more attention to these topics. I've put alt tags there mostly because it showed me a warning when not having them =)

If it's okay, I'll tag you here, when I have this project refactored, okay?)

1

@VCarames

Posted

@NitaLewska

The ARIA stuff took me a while to learn and I'm still learning it for forms and other stuff... The link I attached helps a lot in identifying decorative images and when to use the alt tag.

Sounds good! Thank you!

Keep it up!

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