Design comparison
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-elfatayryPosted about 2 years ago
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 helpful0 - @asmaa-elfatayryPosted about 2 years ago
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@rox-stahlPosted about 2 years ago@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-elfatayryPosted about 2 years ago@rox-stahl you are welcome, Roxanne. keep going π
0
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