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

Roxanneβ€’ 260

@rox-stahl

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


Updating the selected/rating script into inner HTML. I got it working, then I worked on some CSS and it went away. I tried multiple ways to manipulate, but have gotten stuck. I would love your suggestions!

~Thanks so much 🫢🏼

Community feedback

Asmaa Elfatayryβ€’ 870

@asmaa-elfatayry

Posted

to resolve the Accessibility error

  • you should put all the content of body in <main></main> tag

https://www.w3.org/WAI/ARIA/apg/example-index/landmarks/main.html

https://www.tatianeaguirres.com/blog/2020-10-30-8-landmark-roles-that-every-front-end-should-know/

hope this helps you

Marked as helpful

0
Asmaa Elfatayryβ€’ 870

@asmaa-elfatayry

Posted

Hi Roxanne,

you did a great job but You only have two simple problems

first, you should make this loop block : ratings.forEach((rating)) outside the addEventListener function Parentheses after this : submitButton.addEventListener("click",()=>{})

second, you don't need these two lines

let rateId = e.target.id; const numberBtn = document.getElementById(rateId);

you can just do this:- const numberBtn=e.target; and it will work you don't need access to id after e.target this syntax makes an error

finally, don't forget add the e in Parentheses of addEventListener like this ("click", (e) => {})

0

Roxanneβ€’ 260

@rox-stahl

Posted

@asmaa-elfatayry Hello and thank you! You have helped me out so much. I have to shamefully add that I got so bogged down by the one issue that I forgot a major thing....accessibility. Thank you for the links, I will check those out!

0
Asmaa Elfatayryβ€’ 870

@asmaa-elfatayry

Posted

@rox-stahl you are welcome, Roxanne. keep going πŸ™

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