Image text alternative (image)

<img> requires a descriptive alt attribute. Decorative images use alt="" and aria-hidden="true" or role="presentation":


Alt attribute contains only a space:

This <img> element has an alt=" " which results in an empty accessible name, but is not treated as empty by the accessibility tree:

The space is trimmed by the accessible name computation, but since it's not an actual empty string, the image still has role="img".

Note: Possible to implement. Check for <img> elements where alt contains only whitespace.

axe detected: 1.1.1  |  QualWeb detected: 1.1.1