no-alt-text
What it does
Section titled “What it does”Reports an image whose alternate text is empty ().
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example” and .Configuration
Section titled “Configuration”markdown: lint: rules: no-alt-text: warn # off (default), warn, errorEnabled by the presets: markdown/markdownlint.
Suppress one line with sudsy-disable-next-line no-alt-text in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”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. |