Skip to main content
WCAGrules
Quick navigation

Do not leave image-only links without a name

A link wraps an image and nothing else, and the image carries no alt text, so the link has no name for anything but a mouse. F89 is the failure technique for it, and a match is a defect rather than a fix. The half people argue with is the deliberate one. An empty alt is the right answer for decoration, and it is still this failure when the image is the entire link, because emptying the alt does not delete the link. A screen reader with no name to read falls back on guessing, usually from the file name, so the user hears football dot gif followed by whatever text it scraped from nearby. Where an image link sits next to a text link going to the same page, the answer is to merge them into one link rather than to name both. W3C files this failure under a Level AAA link rule as well.

How we find it in an audit

Scanners catch most of these outright, since a link holding only an image with no alt, no aria-label and no aria-labelledby is a machine-checkable shape. We confirm each one in the accessibility tree, then go after the two cases a scanner reads as clean. An image link marked role presentation, which hides the picture and leaves the link nameless. And a picture link sitting beside a text link to the same destination, which is a genuine finding and the one that usually surprises the team that shipped it.

How affected users experience it

A nameless image link arrives as a URL read out loud, or as a file name, or as nothing at all. Site slash cart slash index dot php, link. From that, the user decides whether this is the checkout button or an advertisement. Duplicate links cost time a different way, because one destination turns up twice in a links list under two unrelated names, and the only way to learn they are the same page is to open both.

Passes vs. fails

Passes: alt text names the product. Fails: the file name is all there is.

Passes

<a href="/"><img src="logo.svg" alt="Acme home"></a>

Fails

<a href="/"><img src="logo.svg" alt=""></a>

How this gets tested

The W3C publishes test rules that define what a checker looks for here.

The other techniques filed under this rule

22 guides on this site are filed under 2.4.4 Link Purpose (In Context). W3C documents this one as a failure of that rule, so it describes a way the rule gets broken rather than a way to pass it.

This guide is our interpretation of W3C technique F89: Failure of Success Criteria 2.4.4, 2.4.9 and 4.1.2 due to not providing an accessible name for an image which is the only content in a link. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations