-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update new rule MD059/descriptive-link-text for project-level consist…
…ency.
- Loading branch information
1 parent
8950d7b
commit a324ec5
Showing
23 changed files
with
439 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
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. | ||
This rule is triggered when a link has generic text like `[click here](...)` or | ||
`[link](...)`. | ||
|
||
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 text should be descriptive and communicate the purpose of the link (e.g., | ||
`[Download the budget document](...)` or `[CommonMark Specification](...)`). | ||
This is especially important for screen readers which sometimes present links | ||
without context. | ||
|
||
Link names should be descriptive and describe the purpose of the link, like: | ||
`[Download the budget document]`, `[About markdownlint]`,`[View registration]`, | ||
etc. | ||
By default, this rule prohibits a small number of common English words/phrases. | ||
To customize that list of words/phrases, set the `prohibited_texts` parameter to | ||
an `Array` of `string`s. | ||
|
||
To override the default list and configure your own list of banned accessible | ||
names, set `link_texts` in the config. | ||
Note: For languages other than English, use the `prohibited_texts` parameter to | ||
customize the list for that language. It is *not* a goal for this rule to have | ||
translations for every language. | ||
|
||
Note: This rule checks Markdown-style links and ignores HTML-style links. | ||
Note: This rule checks Markdown links; HTML links are ignored. | ||
|
||
More information: <https://webaim.org/techniques/hypertext/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.