Design comparison
Solution retrospective
It would be really helpful if you could suggest an easier approch for making css hover work after the javascript click event is executed on rating?
Community feedback
- @umairanwerPosted over 2 years ago
Hi, the issue arises because when you revert the styles using js, the styles of the pseudo classes (:hover) are also set to these styles, thus your hover action stops working. Although you coded the hover effect again using js but a simpler solution is that to reset styles of deselected items by setting their style properties to empty string in js, this way the original css styles will take effect.
ratelist[y].style.backgroundColor = ""; ratelist[y].style.color = "";
Now you can remove the hover effect code from js and your page will function as intended.
Marked as helpful0 - @SamadeenPosted over 2 years ago
Hey!! Cheers 🥂 on completing this challenge.. .
Here are my suggestions..
- You should use <main class="rating"> instead of <div class="rating">.
- Go down orderly when you are using the headings h1 down to h2 down to h3 and so on.
- You can wrap your attribution section in a footer tag to avoid accessibility issues.
- You should add a
alt
text to yourimg
tag to aid screen-readers
This should fix most of your accessibility issues
. Regardless you did amazing... hope you find this useful... Happy coding!!!
Marked as helpful0@harleenkaur1343Posted over 2 years ago@Samadeen Thanks Abdul, would definitely implement them from now on..
0 - @FahimEchoPosted over 2 years ago
great work harleen..keep up your practice.all the best
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