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
<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.
- Link has non-empty accessible nameA tool can check this
- Link in context is descriptiveA tool can check this
- Links with identical accessible names and same context serve equivalent purposeA tool finds candidates, you decide
- Link is descriptiveA tool can check this
- Links with identical accessible names have equivalent purposeA tool can check this
- Image button has non-empty accessible nameA tool can check this
- ARIA attribute is defined in WAI-ARIAA tool can check this
- ARIA state or property has valid valueA tool can check this
- Element with role attribute has required states and propertiesA tool can check this
- Form field has non-empty accessible nameA tool can check this
- Role attribute has valid valueA tool can check this
- ARIA state or property is permittedA tool can check this
- Button has non-empty accessible nameA tool can check this
- Element with aria-hidden has no content in sequential focus navigationA tool can check this
- Element with presentational children has no focusable contentA tool can check this
- Menuitem has non-empty accessible nameA tool can check this
- Summary element has non-empty accessible nameA tool can check this
- Iframe element has non-empty accessible nameA tool can check this
- Iframe elements with identical accessible names have equivalent purposeA tool finds candidates, you decide
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.
- ARIA7sufficientBuild clear link names from nearby headings
- ARIA8sufficientFix vague link text with aria-label
- C7sufficientAdd hidden text to clarify short links
- G53sufficientLet the sentence around a link explain it
- G91sufficientWrite link text that states its purpose
- G189sufficientOffer a switch to self-describing link text
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.