Skip to content

no-alt-text

Markdownstyleno fixdefault: offmarkdown/markdownlint

Reports an image whose alternate text is empty (![](url)).

The alternate text is what a screen reader reads, what shows when the image fails to load, and what a search engine indexes. An image without it is invisible to all of them.

To fix, describe the image in the brackets. An image that is only decoration can keep an empty text on purpose, and then the rule should be turned off for that file.

Reported
![](logo.png) and ![Logo](logo.png).
markdown:
lint:
rules:
no-alt-text: warn # off (default), warn, error

Enabled by the presets: markdown/markdownlint.

Suppress one line with sudsy-disable-next-line no-alt-text in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
markdownlint MD045 partial An HTML <img alt=""> is not an image here.