Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Rule to discourage generic link text #681

Open
khiga8 opened this issue Dec 15, 2022 · 5 comments · May be fixed by #1459
Open

[Proposal] Rule to discourage generic link text #681

khiga8 opened this issue Dec 15, 2022 · 5 comments · May be fixed by #1459
Labels

Comments

@khiga8
Copy link
Contributor

khiga8 commented Dec 15, 2022

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
Copy link
Owner

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!

Repository owner deleted a comment May 12, 2023
Repository owner deleted a comment May 12, 2023
Repository owner deleted a comment May 12, 2023
@khiga8
Copy link
Contributor Author

khiga8 commented Jan 6, 2025

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

@DavidAnson
Copy link
Owner

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

@DavidAnson
Copy link
Owner

(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 khiga8 linked a pull request Jan 6, 2025 that will close this issue
@khiga8
Copy link
Contributor Author

khiga8 commented 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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants