Dytoma• 570
@Dytoma
Posted
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