1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Define Images with Appropriate Text Alternatives

    reactReact
    >=16.10.2

    Images must have text alternatives that describe the information or function represented by them so they can be read and understood by those using screen readers.

    Alternative text for images

    • All <img> elements should have an alt attribute provided
      • When not provided many screen readers will fallback to reading the file name instead
    • The alt value should not include words like “image”, “picture” or “icon”
      • Screen readers are already announcing that the element is an image
    • Images that are decorative only and provide no information or function to the page should be hidden from Assistive Technologies by providing an empty alt attribute (alt=””)

    References