Skip to content

Commit db2f795

Browse files
author
markzegarelli
authored
Add vale rule to check for empty image alt tags (#3034)
1 parent 82b4b9a commit db2f795

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.github/styles/segment/alt-tag.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: existence
2+
message: 'Please add alt text to the image'
3+
level: warning
4+
scope: raw
5+
nonword: true
6+
raw:
7+
- '(\!\[\])'

src/utils/vale-test.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ For example, like [this](/docs/connections)
1111
segment.com/docs
1212

1313
Here's an update.
14-
15-
14+
![alt tag](/diagram-library/Elements.png)

vale-styles/segment/alt-tag.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: existence
2+
message: 'Please add alt text to the image'
3+
level: warning
4+
scope: raw
5+
nonword: true
6+
raw:
7+
- '(\!\[\])'

0 commit comments

Comments
 (0)