Links must have discernible text

How to fix the link-name accessibility rule. Names of links, buttons and controls.

What this rule checks

Ensure links have discernible text

Who is affected

Screen readers announce this link as just "link", so users can't tell where it goes. This usually happens with icon-only links.

How to fix it

Give the link visible text, or an aria-label if it's an icon. If it wraps an image, give the image alt text.

Example

Before

<a href="/cart"><svg>…</svg></a>

After

<a href="/cart" aria-label="Shopping cart"><svg aria-hidden="true">…</svg></a>

WCAG success criteria

When this rule fails, the page fails:

Find it on your own page

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.

More detail