Skip to content

New rule: anchor-ambiguous-text #866

Closed
@mattxwang

Description

@mattxwang

One pattern that I've occasionally caught during code review is

<a href="...">click here</a>

This is both ambiguous and often inaccessible for screenreader users (this WebAIM page on links has more). Similar issues exist for "link", "here", etc.

Do we think adding a rule to catch these errors is reasonable? I'm only familiar with this project as a user (and not a contributor), so I'm not sure if this aligns with the vision for this plugin. I also see an issue where this is more of a subjective rule (rather than a missing attribute), and would be hard to get properly without false positives. If there are other projects that are better suited for something like this, any pointers would be appreciated.

Happy to open a PR for a new rule if we think this is a good idea!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions