DEV Community

[Comment from a deleted post]
Collapse
 
alohci profile image
Nicholas Stimpson

"An example" maybe. Since you have used an <img> element in HTML and not a background image in CSS, you're indicating that it's content pertinent to the page. By adding an empty alt attribute, you're hiding that content from screen readers, so their users won't even know that an image is present. It's generally regarded that unsighted users should at least be aware of a image's presence so that they might discuss it with others.