Re:Problems with the CSS background-image property
by jakelazaroff on Sunday July 28, 2019 @01:01PM
(#20548543)
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.
[ Parent
| on HN ]
Re:Problems with the CSS background-image property
by khalwat on Sunday July 28, 2019 @01:16PM
(#20548625)
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.