Unique and descriptive link text
Explanation
Using clear link text has lots of benefits. It helps people with disabilities who use things like screen readers, but it also helps everyone else find their way around. Your text should show the reason for each link. Your reader should know where they are going - and what they will find when they get there - based on the link.
For users with cognitive limitations, clear link text keeps people from getting confused. It gives them the information they need to make better decisions about which links to follow. People who use a keyboard to get around on their computer instead of a mouse or touchscreen tab through links and understand their purpose. This can be extra helpful for someone who has a physical limitation and can't use one of those other ways to connect.
All of your links should be clear, including a picture on the page that acts like a link. It might not have visible text but it still should tell users where they are going. Setting the photo's alternative text is enough as long as it explains the purpose and destination for the link. Of course, someone who is not using special tools should be able to figure out where they are going from the picture.
Demonstration
In the demonstration videos below, the user is searching for a link in a document by jumping from link to link using NVDA's single-key navigation. Since they are only listening to links, they won't hear the context provided by the surrounding text. In the first video (Screen reader demonstration: Unique and descriptive link names (BAD), 0:41), links lack descriptive names or titles. The 'Click here to read more' links are not unique and require the user to navigate to the surrounding content to understand the meaning. The second video (Screen reader demonstration: Unique and descriptive link names (GOOD), 0:44) shows the same text but with unique and descriptive link text. It's more user-friendly for both assistive technology users and for those without disabilities.
Screen reader demonstration: Unique and descriptive link names (BAD)
Screen reader demonstration: Unique and descriptive link names (GOOD)
Suggested techniques
Source: Understanding Success Criterion 2.4.4: Link Purpose (In Context) (w3.org)
Each numbered item in this section represents a technique or combination of techniques that the WCAG Working Group deems sufficient for meeting this Success Criterion. However, it is not necessary to use these particular techniques. For information on using other techniques, seeĀ Understanding Techniques for WCAG Success Criteria, particularly the "Other Techniques" section.
Sufficient techniques for SC 2.4.4 (Level A)
- G91: Providing link text that describes the purpose of a link
- H30: Providing link text that describes the purpose of a link for anchor elements
- H24: Providing text alternatives for the area elements of image maps
-
Allowing the user to choose short or long link text using one of the techniques below:
- G53: Identifying the purpose of a link using link text combined with the text of the enclosing sentence
-
Providing a supplemental description of the purpose of a link using one of the following techniques:
-
Identifying the purpose of a link using link text combined with programmatically determined link context using one of the following techniques:
- ARIA7: Using aria-labelledby for link purpose
- ARIA8: Using aria-label for link purpose
- H77: Identifying the purpose of a link using link text combined with its enclosing list item
- H78: Identifying the purpose of a link using link text combined with its enclosing paragraph
- H79: Identifying the purpose of a link in a data table using the link text combined with its enclosing table cell and associated table header cells
- H81: Identifying the purpose of a link in a nested list using link text combined with the parent list item under which the list is nested
Web Content Accessibility Guidelines (WCAG)
WCAG 2.1 requires that the purpose of the link can be determined. It's part of the Operable principle and makes sure that visitors can navigate your information. There are 2 Success Criteria for Link Purpose.
- SC 2.4.4 (Link Purpose (In Context)) requires that "the purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context, except where the purpose of the link would be ambiguous to users in general." SC 2.4.4 is a level A criterion that represents the minimum level of accessible content.
- SC 2.4.9 (Link Purpose (Link Only)) says that users can figure out the purpose of your link from the link text alone. While SC 2.4.4 considers the text around the link, SC 2.4.9 only considers the link itself. It's helpful for a tool that collects a list of links on your page, for example. SC 2.4.9 is a Level AAA criterion which provides the greatest accessibility.
Exception: Links that are "ambiguous to users in general" don't have to meet these criteria. For example, if my page says, "Sally has 124 puppies for sale" and the word "puppies" is a link, then none of your users will know what it is until they click it. It could be a photo of a puppy, a link to a puppy ad, or open an email message addressed to the puppies. A user without a disability doesn't know what to expect and doesn't have any advantage over someone using assistive technology.