# Links must have discernible text

Source: https://www.fixreports.com/issues/link-name

WCAG 2.4.4 Link Purpose (In Context), 4.1.2 Name, Role, Value · Level A

Some links have no text a screen reader can announce, often icon-only links such as social icons or the cart icon.

## What this rule checks
Ensure links have discernible text.

## Why it matters
WCAG 2.4.4 and 4.1.2 require links to have an accessible name that describes their purpose.

## How to fix it
### On any website
1. Find the links that have no name. Most are icons or images inside an <a> tag.
2. Add visually hidden text inside the link, or an aria-label such as aria-label="Instagram" or aria-label="Cart".
3. If the link wraps an image, give the image meaningful alt text instead.

### On Shopify
1. Find the links that have no name. Most are icons or images inside an <a> tag.
2. Add visually hidden text inside the link, or an aria-label such as aria-label="Instagram" or aria-label="Cart".
3. If the link wraps an image, give the image meaningful alt text instead.

### On WooCommerce and WordPress
1. Find the links that have no name. Most are icons or images inside an <a> tag.
2. Add visually hidden text inside the link, or an aria-label such as aria-label="Instagram" or aria-label="Cart".
3. If the link wraps an image, give the image meaningful alt text instead.

## How to check the fix
- Re-scan and confirm link-name is gone.
- Tab to each link with a screen reader running and listen to the name.

## Sources
- axe-core rule documentation (Deque): https://dequeuniversity.com/rules/axe/4.13/link-name
- Understanding WCAG 2.4.4 (W3C): https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context
- Understanding WCAG 4.1.2 (W3C): https://www.w3.org/WAI/WCAG22/Understanding/name-role-value
