-
-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
The require-img-alt rule incorrectly flags empty alt attributes (alt="") as invalid. According to accessibility guidelines (WCAG 2.1 SC 1.1.1 and RGAA 4.1 Criterion 1.1), an empty alt is the recommended approach for decorative images (e.g., icons, spacers, or purely visual elements).
To Reproduce
Feedback is based on documentation : https://html-eslint.org/docs/rules/require-img-alt
Expected behavior
The rule should not report errors for alt="".
Additional context
Empty alt attributes ensure screen readers skip decorative images, improving UX for assistive tech users.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation