Skip to content

Commit

Permalink
Update next/link API docs to mention a11y and ESLint rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Sep 6, 2021
1 parent 970f85e commit 61b620e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-reference/next/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default Posts

## If the child is a custom component that wraps an `<a>` tag

If the child of `Link` is a custom component that wraps an `<a>` tag, you must add `passHref` to `Link`. This is necessary if you’re using libraries like [styled-components](https://styled-components.com/). Without this, the `<a>` tag will not have the `href` attribute, which might hurt your site’s SEO.
If the child of `Link` is a custom component that wraps an `<a>` tag, you must add `passHref` to `Link`. This is necessary if you’re using libraries like [styled-components](https://styled-components.com/). Without this, the `<a>` tag will not have the `href` attribute, which hurts your site's accessibility and might affect SEO. If you're using [ESLint](/docs/basic-features/eslint.md#eslint-plugin), there is a built-in rule `next/link-passhref` to ensure correct usage of `passHref`.

```jsx
import Link from 'next/link'
Expand Down

0 comments on commit 61b620e

Please sign in to comment.