[ARIA] Define Images with Appropriate Text Alternatives

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

猜你喜欢

转载自www.cnblogs.com/Answer1215/p/12702722.html