Pattern: Missing alt
for img
element
Issue: -
Enforce that an img
element contains the alt
attribute or
role='presentation'
for a decorative image. All images must have alt
text to convey their purpose and meaning to screen reader users.
Besides, the alt
attribute specifies an alternate text for an image,
if the image cannot be displayed.
This rule accepts as a parameter a string array for tag names other than
img
to also check. For example, if you use a custom tag named Image
then configure the rule with: [true, ['Image']]
.