1. Module
    1. Empty links
    2. URLs
    3. Anchor text
    4. Writing good anchor text
  2. Video
    1. Video Transcript

Estimated time to complete: 10 minutes

Module

In this module, we will discuss three aspects of hyperlinks: empty links, URLs, and anchor text. We will also discuss the importance behind using these aspects of hyperlinks.

Empty links

An empty hyperlink is a link with no text. It is invisible to people viewing the page, which causes navigation on a page to be difficult for screen readers.

You should not have empty links on your web page. To resolve this issue, remove the empty link or provide anchor text.

As empty links are invisible on the front end, you can request a scan for empty links from Web Services, and we can help you pinpoint their exact location.

URLs

The URL is the full link address, which can be seen in the search bar. For example, this page’s URL is https://carleton.ca/webworkshops/accessibility-training/module-2-text/hyperlinks/. While, visually, it’s pretty easy to skip over the text of a URL, screen readers may read the URL out, which is unnecessary and inconvenient for users. As well, the URL is often not very descriptive of the link destination, introducing unnecessary ambiguity over where the link leads.

Therefore, instead of copying in the full URL, we recommend inserting hyperlinks with anchor text.

Anchor text

Anchor text is text that appears instead of the full URL. It is often blue and underlined, or, on Carleton-themed websites, red and bolded.

Though you may not be familiar with the term “anchor text”, it’s very likely that you’ve come across it before. In fact, the “request a scan” link under the Empty links header is an example of anchor text. The anchor text reads “request a scan” while clicking on the text redirects you to the URL https://itsjira.carleton.ca/servicedesk/customer/portal/5.

Anchor text helps people who use screen readers know where they are going and what they are clicking when they click the anchor text.

This is another example of anchor text leading to the homepage of the introduction to CMS training.

Writing good anchor text

While anchor text is generally an improvement over just a plain URL, there are ways to improve your anchor text as well.

The best rule of thumb with writing anchor text is to use descriptive keywords in your anchor text to indicate where clicking the link leads.

Bad anchor text:

You may often see links with text that just read Click here. Without the surrounding context, the anchor text is essentially meaningless. Users would need to either click the link and find out where it leads, or search the surrounding text for clues.

Besides being inconvenient to all users, anchor text like this can also raise significant accessibility issues. While it might be easy for one user to open the link and quickly check where it leads, another might lose track of where they were on the previous page, be unable to quickly scan the linked page, or else have difficulty navigating back to the previous page.

Good anchor text:

A better version of the click here anchor text is to expand on what this action will result in. For example, Click here to view our tutorial on using hyperlinks properly.

Some other examples of good anchor text:

  • Register for our event: linking to a registration page/form
  • Visit this page to apply: linking to a page/form to apply
  • Learn more about (topic): linking to a page, post, etc. with more information
  • Buy a copy of this book: linking to a page to buy a copy of the book

Video

Video Transcript