MD045 - Images Should Have Alt Text
Images should have alternate text (alt text).
Why This Rule Exists
Alt text is essential for accessibility. Screen readers use it to describe images to visually impaired users. It also displays when images fail to load.
Examples
Incorrect

![][logo]
[logo]: logo.png
Correct

![Company logo][logo]
[logo]: logo.png "Company Logo"
Good Alt Text


Configuration
This rule has no configuration options.
When to Disable
- Decorative images that don't convey information
- Documents where images are supplementary
Rule Details
- Rule ID: MD045
- Aliases: no-alt-text
- Category: Images
- Severity: Warning
- Auto-fix: Yes (adds placeholder alt text)
Writing Good Alt Text
| Image Type | Alt Text Approach |
|---|---|
| Informative | Describe the content and purpose |
| Decorative | Use empty alt  |
| Charts | Summarize the data shown |
| Screenshots | Describe what the screenshot shows |
| Icons | Describe the action or meaning |
Accessibility Standards
This rule helps comply with:
- WCAG 2.1 Success Criterion 1.1.1 (Non-text Content)
- Section 508 accessibility requirements