Design comparison
SolutionDesign
Community feedback
- @DytomaPosted almost 2 years ago
Hey👋
Good job on completing this challenge, I have some suggestions that you can use to improve your code.
- First instead of using a
div
to wrap the dice image, I'll suggest you use abutton
. The reason for that is that you want screen readers to notice users with disabilities to understand what you're passing through your page and then you can add anaria-label
to your button andaria-hidden="true"
to the dice image. - Here is the code: instead of this
<div id="dice-neon-circle" onclick="getAdvice()"><img src="images/icon-dice.svg" alt="" srcset="" /></div>
use this<button id="dice-neon-circle" onclick="getAdvice()"><img src="images/icon-dice.svg" alt="" srcset="" /></button>
And you would want to add some descriptive content to the
alt
attribute.Happy coding🙌
0 - First instead of using a
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