WCAG 2.1 H67: Using null alt text and no title attribute on img elements for images that AT should ignore (wcag/h67)

WCAG 2.1 technique H67 requires decorative images to have empty alt text (alt="") and empty or absent title.

Rule details

Examples of incorrect code for this rule:

<img title="Lorem ipsum">
error: <img> with empty alt text cannot have title attribute (WCAG/H67) at inline:1:6:
> 1 | <img title="Lorem ipsum">
    |      ^^^^^

1 error found.

Examples of correct code for this rule:

<!-- empty alt text and no title is interpretated as purely decorative -->
<img alt="">

<!-- alt text is used together with title, the image carries meaning and will not be ignored by AT -->
<img alt="Lorem ipsum" title="Lorem ipsum">