anchorAmbiguousText
Reports anchor elements with ambiguous text that doesn't describe the link destination.
✅ This rule is included in the jsx logical preset.
Anchor elements should have descriptive text that clearly indicates where the link leads or what action it performs. Ambiguous text like “click here”, “here”, “link”, or “read more” doesn’t provide meaningful context for users, especially those using screen readers who often navigate by jumping between links.
This rule checks that anchor elements don’t contain common ambiguous phrases that fail to describe the link destination.
Examples
Section titled “Examples”<a href="/about">click here</a><a href="/docs">here</a><a href="/contact">link</a><a href="/pricing">read more</a><a href="/about">About Us</a><a href="/docs">View Documentation</a><a href="/contact">Contact Information</a><a href="/pricing">See Pricing Details</a>When Not To Use It
Section titled “When Not To Use It”If you use a framework that automatically adds sufficient context around links you might choose to disable this rule.
Further Reading
Section titled “Further Reading”- WebAIM: Links and Hypertext
- WCAG 2.4.4 - Link Purpose (In Context)
- WCAG 2.4.9 - Link Purpose (Link Only)
Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
jsx-a11y/anchor-ambiguous-text - Oxlint:
jsx-a11y/anchor-ambiguous-text
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.