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

Mohamed Lajnefβ€’ 60

@momolajnef1

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


There is a bug when you hover after selecting and deselecting the rating. I am unsure about the way I wrote the css file. I believe there is a lot to improve. Any feedback is welcome.

Community feedback

Adrianoβ€’ 33,950

@AdrianoEscarabote

Posted

Hi Mohamed Lajnef, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:

Document should have one main landmark, this problem is being caused by the fact that there is no main tag around the main content of the page! Since this challenge is based on only one component, there is no other component more important than it on this page, so to solve this, wrap all the content with the main tag,

It's always good to pay attention to the correct use of semantic html elements, as they are extremely important for people who use screen readers, to know what the main content of the page is in the case of the main tag!

To improve the accessibility of the project you could have put an h1. Every page must contain a level 1 header, for people who use screen readers, identity what the main title is and follow the sequence h1-h5

<h1>How did we do?</h1>

The rest is great!

I hope it helps... πŸ‘

Marked as helpful

1

Mohamed Lajnefβ€’ 60

@momolajnef1

Posted

@AdrianoEscarabote Buddy! I am doing fine. I hope you do too. I love your projects. I looked at them and felt inspired to keep going. Thank you for the feedback. Indeed I appreciate it a lot. New Information that I didn't know about. I will be more careful with the next projects.

1

@VCarames

Posted

Hey there! πŸ‘‹ Here are some suggestions to help improve your code:

  • Do not forget to update your code with everything the report found to be incorrect.

  • The β€œicons/illustrations” in this component serve no other purpose than to be decorative; Their 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/

  • The "rating buttons" should not be built using the anchor element, since the anchor is for linking internal/external content.
  • The proper way to build the "rating buttons" in this challenge is to create a form and inside of it, there should be fiveinput radios and each input should have a label attached to it to make the buttons accessible. Finally wrap all the inputs and labels inside a fieldset to prevent users from making more than one selection.

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!πŸŽ„πŸŽ

0

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