mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Refine implementation of MD045/no-alt-text in previous commit.
This commit is contained in:
parent
4fa837a031
commit
f91f0880c3
7 changed files with 61 additions and 44 deletions
26
doc/Rules.md
26
doc/Rules.md
|
@ -1246,10 +1246,32 @@ Set the `code_blocks` parameter to `false` to disable this rule for code blocks.
|
|||
|
||||
<a name="md045"></a>
|
||||
|
||||
## MD045 - Images should have ALT Text attribute
|
||||
## MD045 - Images should have alternate text (alt text)
|
||||
|
||||
Tags: accessibility, images
|
||||
|
||||
Aliases: no-alt-text
|
||||
|
||||
This rule is triggered when an image is found with no alt text. This is a key concern for accessibility. [Guidance on how to write alt text for images](https://www.phase2technology.com/blog/no-more-excuses-definitive-guide-alt-text-field).
|
||||
This rule is triggered when an image is missing alternate text (alt text) information.
|
||||
Alternate text is important for accessibility, describing the content of an image for
|
||||
people who may not be able to see it.
|
||||
|
||||
Alternate text is commonly specified inline as:
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||
Or with reference syntax as:
|
||||
|
||||
```md
|
||||
![Alternate text][ref]
|
||||
|
||||
...
|
||||
|
||||
[ref]: image.jpg "Optional title"
|
||||
```
|
||||
|
||||
Guidance for writing alternate text is available from the [W3C](https://www.w3.org/WAI/alt/),
|
||||
[Wikipedia](https://en.wikipedia.org/wiki/Alt_attribute), and
|
||||
[other locations](https://www.phase2technology.com/blog/no-more-excuses-definitive-guide-alt-text-field).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue