Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 743 Bytes

GH003-no-empty-alt-text.md

File metadata and controls

27 lines (16 loc) · 743 Bytes

GH003 No Empty Alt Text

Rule details

⚠️ This rule is off by default and is only applicable for GitHub rendered markdown.

Currently, all images on github.com are automatically wrapped in an anchor tag.

As a result, images that are intentionally marked as decorative (via alt="") end up rendering as a link without an accessible name. This is confusing and inaccessible for assistive technology users.

This rule can be enabled to enforce that the alt attribute is always set to descriptive text.

This rule should be removed once this behavior is updated on GitHub's UI.

Examples

Incorrect 👎

<img src="cat.png" alt="">

Correct 👍

<img src="mona.png" alt="Mona Lisa, the Octocat">