Implement the [`GitHub::Accessibility::ImageHasAlt`](https://github.com/github/erblint-github/blob/main/lib/erblint-github/linters/github/accessibility/image_has_alt.rb) rule from [`erblint-github`](https://github.com/github/erblint-github). ### Rule Details `<img>` should have an `alt` prop with meaningful text or an empty string for decorative images. ### Examples **Incorrect** code for this rule: ```html <img src="logo.png"> ``` **Correct** code for this rule: ```html <img alt="" src="logo.png"> <a href="https://github.com/"><img alt="GitHub homepage" src="logo.png"></a> ``` ### References - [erblint-github source](https://github.com/github/erblint-github/blob/main/lib/erblint-github/linters/github/accessibility/image_has_alt.rb) - [erblint-github docs](https://github.com/github/erblint-github/blob/main/docs/rules/accessibility/image-has-alt.md) - [W3C WAI Images Tutorial](https://www.w3.org/WAI/tutorials/images/) - [Primer: Alternative text for images](https://primer.style/design/accessibility/alternative-text-for-images) ### Parent Issue - #1205
Implement the
GitHub::Accessibility::ImageHasAltrule fromerblint-github.Rule Details
<img>should have analtprop with meaningful text or an empty string for decorative images.Examples
Incorrect code for this rule:
Correct code for this rule:
References
Parent Issue
erblint-githubcompatibility/parity #1205