Accessibility

link-text

Forbid empty anchors and generic "click here" link text.

Flags anchor tags with no visible text and the generic phrases ("click here", "read more", "learn more") that strip a link of its semantic purpose. Screen-reader users navigate by listing links — generic text removes the link's entire signal.

Behavior

  • Fixable: No.
  • Suggestions: No.
  • Maps to: WCAG 2.4.4 (Link Purpose, In Context).

Examples

Bad:

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

Good:

<a href="/pricing">View pricing plans</a>

Related rules

Use it

Enable link-text in your eslint.config.js:

import deslint from '@deslint/eslint-plugin';

export default [
  {
    plugins: { deslint },
    rules: {
      'deslint/link-text': 'error',
    },
  },
];

Found a false positive? Report it on GitHub →

Back to all rules