Skip to main content

Accessibility rule: Link without a text alternative, explained

Modified on: Mon, 6 Feb, 2023 at 9:00 PM

This check makes sure that all types of links that assistive technology users might encounter have an accessible name. Screen reader users need a good text description of the link, they are about to click.

Who is impacted by this?

If an image link is missing an accessible name, screen reader users will not know what the link is supposed to do. In this case, many screen readers will read the URL of the link instead.

Note: Here we check for the presence of an accessible name. It does not check how suitable the link text is.

You can read more about the best practices for accessible links here.

How does the check work?

This rule checks that links, such as <a> elements, <area> elements, and elements with a role=link attribute, have an accessible name.

You can read more about this check in the technical documentation for Alfa, Siteimprove’s open-source accessibility conformance testing engine.

Common Misunderstandings:

Many users try to fix this issue by using the technique they’re familiar with for adding “alt text” to an image: the alt=”…” attribute.  That generally won’t work here, because the alt attribute is only allowed on <img> elements - not on <a> elements.

Instead, here are some techniques that will work:  

<a href="">Text alternative goes here.</a>  

<a href="" aria-label="Text alternative goes here."></a>  

<a href=""><img src="facebook.png" alt="Text alternative goes here."/></a>  (This works because the alt attribute is on the<img> element, not the <a> element.)

Please note that “accessible name” and “text alternative” mean the same thing.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.