[GH-ISSUE #681] [Proposal] Rule to discourage generic link text #2352

Closed
opened 2026-03-07 20:06:57 +03:00 by kerem · 5 comments
Owner

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!

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](https://www.accessguide.io/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!
kerem 2026-03-07 20:06:57 +03:00
Author
Owner

@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!

<!-- gh-comment-id:1353504613 --> @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!
Author
Owner

@khiga8 commented on GitHub (Jan 6, 2025):

2 years late, but I'll pick this up :)

<!-- gh-comment-id:2573659081 --> @khiga8 commented on GitHub (Jan 6, 2025): 2 years late, but I'll pick this up :)
Author
Owner

@DavidAnson commented on GitHub (Jan 6, 2025):

Haha, these days I recommend the micromark parser. The custom rule docs are up to date!

<!-- gh-comment-id:2573862651 --> @DavidAnson commented on GitHub (Jan 6, 2025): Haha, these days I recommend the micromark parser. The custom rule docs are up to date!
Author
Owner

@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.)

<!-- gh-comment-id:2573874143 --> @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.)
Author
Owner

@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! :)

<!-- gh-comment-id:2574045112 --> @khiga8 commented on GitHub (Jan 6, 2025): Sounds good! I just opened [[WIP] Add new rule: no-generic-link-name #1459](https://github.com/DavidAnson/markdownlint/pull/1459), if you'd like to provide a first pass review to ensure I'm on the right track! :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2352
No description provided.