# anchor-ambiguous-text

Rule `jsx-a11y/anchor-ambiguous-text`. Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".

- Source: jsx-a11y
- Technologies: Accessibility, React
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #472 by reach, #107 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jsx-a11y/anchor-ambiguous-text` | no | no | package `eslint-plugin-jsx-a11y` | [docs](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md) |
| Oxlint | `jsx-a11y/anchor-ambiguous-text` | no | no | plugin `jsx-a11y`, category restriction | [docs](https://oxc.rs/docs/guide/usage/linter/rules/jsx_a11y/anchor-ambiguous-text.html) |
| Biome | `a11y/noAmbiguousAnchorText` | yes | no | group a11y, since 2.3.10 | [docs](https://biomejs.dev/linter/rules/no-ambiguous-anchor-text/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<a>here</a>
<a>HERE</a>
<a>link</a>
<a>click here</a>
<a>learn more</a>
<a>learn more.</a>
<a>learn more,</a>
<a>learn more?</a>
<a>learn more!</a>
<a>learn more:</a>
<a>learn more;</a>
<a>a link</a>
<a> a link </a>
<a><span> click </span> here</a> // goes through element children
<a>a<i></i> link</a>
<a><i></i>a link</a>
<a><span aria-hidden="true">more text</span>learn more</a> // skips over elements with aria-hidden=true
<a aria-label="click here">something</a> // the aria-label here is inaccessible
<a><img alt="click here"/></a> // the alt tag is still ambiguous
<a alt="tutorial on using eslint-plugin-jsx-a11y">click here</a> // the alt tag is only parsed on img
```

### Correct: the rule accepts this

```jsx
<a>read this tutorial</a> // passes since it is not one of the disallowed words
<a>${here}</a> // this is valid since 'here' is a variable name
<a aria-label="tutorial on using eslint-plugin-jsx-a11y">click here</a> // the aria-label supersedes the inner text
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import jsxA11y from "eslint-plugin-jsx-a11y";

export default [
  {
    plugins: { "jsx-a11y": jsxA11y },
    rules: {
      "jsx-a11y/anchor-ambiguous-text": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "jsx-a11y"
  ],
  "rules": {
    "jsx-a11y/anchor-ambiguous-text": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "a11y": {
        "noAmbiguousAnchorText": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [jsx-a11y/no-aria-hidden-on-focusable](https://lintradar.dev/rules/jsx-a11y/no-aria-hidden-on-focusable.md): Disallow `aria-hidden="true"` from being set on focusable elements.
- [jsx-a11y/prefer-tag-over-role](https://lintradar.dev/rules/jsx-a11y/prefer-tag-over-role.md): Enforces using semantic DOM elements over the ARIA `role` property.
- [jsx-a11y/lang](https://lintradar.dev/rules/jsx-a11y/lang.md): Enforce lang attribute has a valid value.
- [jsx-a11y/no-noninteractive-element-interactions](https://lintradar.dev/rules/jsx-a11y/no-noninteractive-element-interactions.md): Non-interactive elements should not be assigned mouse or keyboard event listeners.
- [jsx-a11y/autocomplete-valid](https://lintradar.dev/rules/jsx-a11y/autocomplete-valid.md): Enforce that autocomplete attributes are used correctly.
- [jsx-a11y/no-autofocus](https://lintradar.dev/rules/jsx-a11y/no-autofocus.md): Enforce autoFocus prop is not used.

---

Web page: https://lintradar.dev/rules/jsx-a11y/anchor-ambiguous-text. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
