mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #681] [Proposal] Rule to discourage generic link text #2352
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khiga8 on GitHub (Dec 15, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/681
Hello! First off, thank you for this project!
I wanted to suggest an accessibility-focused rule that discourages generic link text from being set such as
Read more,Learn more,link,Click here,here, etc.Screen reader users often navigate through a page by tabbing through links, or by using a screen reader menu that displays all the links on a page. If the link text is super generic like,
Learn more, it's not clear where that link will go to without needing to navigate the entire surrounding context. Descriptive link texts are beneficial even for non-screen reader users.Access Guide: Descriptive link text
I'm thinking that we could have a default array of discouraged link text, and allow additional ones to be configured.
I'm happy to take this work on. Let me know what you think!
@DavidAnson commented on GitHub (Dec 15, 2022):
This makes sense and should be pretty straightforward since it can use the parser output for links directly. There is precedent in existing rules for analyzing link content that could inform the implementation of this rule. There is already an "accessibility" tag that can be used here. I plan to do a new release soon and will not include this due to timing, but you could iterate in a PR if you'd like. Please see CONTRIBUTING.md or similar PRs for expectations. Thanks!
@khiga8 commented on GitHub (Jan 6, 2025):
2 years late, but I'll pick this up :)
@DavidAnson commented on GitHub (Jan 6, 2025):
Haha, these days I recommend the micromark parser. The custom rule docs are up to date!
@DavidAnson commented on GitHub (Jan 6, 2025):
(I guess you are proposing to add this to the framework, so you'll HAVE to use that parser. :) Please review the contributing guidelines and share early/often so we can avoid misunderstandings.)
@khiga8 commented on GitHub (Jan 6, 2025):
Sounds good!
I just opened [WIP] Add new rule: no-generic-link-name #1459, if you'd like to provide a first pass review to ensure I'm on the right track! :)