Melvin Aguilar ๐ง๐ปโ๐ปโข 61,220
@MelvinAguilar
Posted
Hi there ๐. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
- Not all images should have alt text. The divider image is a decorative image, it does not add any information to the page. You should use an empty
alt
attribute instead of a descriptive one. You can read more about this here.
- Adding functionality to non-interactive elements like
div
orimg
is not recommended because they are not designed to be interactive. You should use interactive elements likebutton
to make your elements interactive.
- The
<div class="circle">
element has another problem when changed to a button. There isn't much information about what the button is for, anddice-icon
as thealt
attribute value is not very descriptive, screen reader users will hear "Button, dice-icon" and they won't understand what the button does. You can useGenerate new advice
as thealt
attribute value. You can see an example here.
- Since I can currently spam it with clicks, it would be better if you added a delay of for example 2 seconds. Block the button and with the
setTimeout
function enable the button again after 2 seconds.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
1