img-alt-present
<img> must have an alt attribute
automaticWCAG 1.1.1 (A)confidence: highseverity: seriousperceivable
Checks that <img> elements provide an alt attribute to support a text alternative mechanism.
Applies to. Applies to <img> elements included in the accessibility tree. Images with role="presentation" or role="none" are excluded only when they are not focusable and have no global ARIA attribute, since presentational roles conflict resolution gives either one back its img role. Hidden images are excluded whether or not they are focusable.
Expectation. Each applicable <img> element has an alt attribute. The alt attribute may be empty (alt="").
Examples
pass
<img src="image.png" alt="Green rectangle">
A non-empty alt is present.
fail
<img src="image.png">
No alt attribute at all (an empty alt="" would instead pass as decorative).