Skip to content

Linter: Implement a11y-image-has-alt rule #1220

@marcoroth

Description

@marcoroth

Implement the GitHub::Accessibility::ImageHasAlt rule from 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:

<img src="logo.png">

Correct code for this rule:

<img alt="" src="logo.png">
<a href="https://github.com/"><img alt="GitHub homepage" src="logo.png"></a>

References

Parent Issue

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions