Hacker News new | ask | show | jobs
by jakelazaroff 2517 days ago
Given that all the images in the article are purely decorative, why you using picture and img tags rather than CSS background-image? You're also supplying alt attributes, so someone with a screen reader will hear a random "Bad boy doggo" in the middle of an article about HTML and CSS.
1 comments

Agreed; if the images are purely decorative (some are, some are not) then it should have an empty `alt=""` to have screen readers skip them.

But I would still want to use an actual picture element with srcset & source attributes/tags for the reasons mentioned in the article.