mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add rule MD059/descriptive-link-text "Link text should be descriptive" (fixes #681).
This commit is contained in:
parent
4117394250
commit
b8374ec5d2
40 changed files with 1159 additions and 234 deletions
16
doc-build/md059.md
Normal file
16
doc-build/md059.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
This rule is triggered when a link is set with generic text like
|
||||
"Click here", "here", or "learn more", giving it a generic accessible name.
|
||||
|
||||
Rationale: Screen reader users may navigate through a list of links
|
||||
to quickly find content on a page. When the link name is something ambiguous
|
||||
like "Learn more", there isn't sufficient context to help the user determine
|
||||
whether to follow the link.
|
||||
|
||||
Link names should be descriptive and describe the purpose of the link, like:
|
||||
`[Download the budget document]`, `[About markdownlint]`,`[View registration]`,
|
||||
etc.
|
||||
|
||||
To override the default list and configure your own list of banned accessible
|
||||
names, set `link_texts` in the config.
|
||||
|
||||
Note: This rule checks Markdown-style links and ignores HTML-style links.
|
||||
Loading…
Add table
Add a link
Reference in a new issue