dai11y 02/08/2021

Your daily frequent11y newsletter, brought to you by @ChrisBAshton:

Your Image Is Probably Not Decorative

  • Eric Bailey explains why most images nowadays need some form of alternative text.
  • You can ‘nullify’ images – removing them from the screen reader experience – by adding an empty alt text, i.e. <img alt="" ...>. This should only be used when the image doesn’t convey information that is important to understanding the purpose of the page or view.
  • You might nullify your images in the following scenarios:
    • Old layout techniques requiring ‘spacer’ images
    • Where the image repeats content that is already in the page (though this could still be confusing for screen reader users who have partial vision)
    • Supplemental icons (e.g. <button><img alt="" src="icon.svg"> Print</button>).
  • Eric also explains how you can provide alt text when using CSS background images (hint: it uses the spacer gif!)

Prefer longer newsletters? You can subscribe to week11y, fortnight11y or even month11y updates! Every newsletter gets the same content; it is your choice to have short, regular emails or longer, less frequent ones. Curated with ♥ by developer @ChrisBAshton.

Loading...