Link text: “Click here” is not information
AccessibilityThere is a test that shows the quality of your link texts in ten seconds.
10 min read
By Timo Wessels Published
There is a test that shows the quality of your link texts in ten seconds. A screen reader, a program that reads the page aloud, can output all the links on a page as a list, cut off from the text around them. In the screen reader NVDA, the key combination NVDA+F7 opens an elements list, in which links are among the elements.
What often comes out is a list like this:
Learn more
Learn more
Click here
Read on
Learn more
Details
Read on
That is no help for navigating, that is noise. And it is what the link texts of most websites look like.
The most important points first:
- A link must be understandable on its own: “To the current price overview” instead of “Click here”.
- Links in running text need an underline besides the colour.
- The visible text of a button must appear in its spoken name.
What this is about
Whoever reads a link should know where it leads, without the paragraph, the heading above or the image beside it.
That is the rule WCAG 2.4.4 “Link Purpose (In Context)”, Level A. The WCAG are the international guidelines for accessible websites. The purpose of each link must be recognisable from the link text alone or from link text and surroundings.
The stricter rule 2.4.9 at the highest level, AAA, requires the purpose to be recognisable from the link text alone. As a yardstick for wording it is good, even if you do not aim for AAA. The W3C names the goal: all users understand what a link does, especially with assistive technology.
Who it helps (as Rheinwerk, Barrierefreie Webseiten, ch. 8.1 describes it):
- Screen reader users who move through a page by link list, because that is faster than reading linearly.
- People with cognitive impairments who decide by the link text whether to click.
- Users of voice input who call up a link by its name.
- Everybody else. Whoever skims a page reads the highlighted links first. A link with content is a signpost for sighted people too.
What makes a good link text
Concrete instead of general. Not “click here”, not “learn more”, not “read on”, but what lies behind it:
<!-- not like this -->
<p>We have revised our prices. <a href="/prices">Click here</a>.</p>
<!-- like this -->
<p>We have revised our prices. <a href="/prices">To the current price overview</a>.</p>
For files, name format and size. Whoever clicks and suddenly starts a download is surprised. A note in the link text prevents that: “Maintenance contract as PDF, 240 kB”.
Same text, same target. If two links carry the same text but lead elsewhere, a user of the link list cannot resolve that. The reverse holds too: two links to the same target should be named the same.
No “link” in the link text. The screen reader announces that it is a link anyway. “Link to price list” otherwise becomes “Link Link to price list”.
The most common fix in daily life: On overview pages with tiles, every tile has a “Learn more” beneath it. Make the heading of the tile the link instead. Then the link is called “Accessibility check”, and the problem is solved at the root. That is my approach.
What a link has to look like
WCAG 1.4.1 “Use of Color” (Level A) applies here too. The W3C writes that colour must not be the only means of conveying information. A link that differs from the text only by colour drops out for some readers. There is an article of its own on this.
In running text a link therefore needs a second signal besides colour. In practice that is the underline. There are alternatives such as bold or a symbol behind it, but everybody understands the underline without explanation.
For design reasons it has often been removed in recent years. After “click here” that is the second big mistake in this area. If the default line bothers you, style it instead of removing it:
.post a {
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
The line then sits lower, is thinner and no longer cuts through the descenders of g, j and p.
Exception: in the main navigation, in lists in the footer and on buttons no underline is needed. There, position and design make it clear that they are controls. The rule applies to links in running text.
The styling must also be the same across the whole website. If links are blue and underlined on one page and green without a line on another, every visitor faces the same learning task twice.
New windows
A link with target="_blank" opens a new window or tab. I use that sparingly. My reasons:
- The browser’s back button then no longer works. For many users it is the most important button.
- An extra window is left behind that somebody has to close.
- Screen reader users often notice the switch only when they want to go back.
- On a smartphone, managing tabs is a hurdle for many.
If you do it anyway, for external sources, documents or forms in the middle of a process, announce it: “To the DIN standard (opens in a new window)”. The W3C lists this among its techniques (G201: warn users in advance when a link opens a new window) as a recommendation. For external links I also set rel="noopener". That is my practice.
When what is seen and what is read aloud drift apart
WCAG 2.5.3 “Label in Name” (Level A) is only understood once you think of voice control. The W3C writes: people who operate by voice use the visible labels in their commands. The name the assistive technology knows must therefore contain the visible text.
A user says “Click Send”. If the button visibly says “Send” and is named so in the code, that works. The mistake comes from a well-meant aria-label:
<!-- wrong: it visibly says "Send", what is read aloud is "Submit form" -->
<button type="submit" aria-label="Submit form">Send</button>
<!-- right -->
<button type="submit">Send</button>
In the first case voice input fails, because “Send” does not occur in the name. An aria-label may be longer, but the visible text must be in it: “Send – submit enquiry” works, “Submit form” does not.
An aria-label is needed only where there is no visible text, such as icon buttons. Where text is present it is mostly superfluous and does more harm than good.
Navigation that is the same everywhere
Two Level AA rules belong together:
- 3.2.3 “Consistent Navigation”: repeated navigation elements appear in the same order on all pages. The menu stays in its place, the footer is built the same everywhere.
- 3.2.4 “Consistent Identification”: elements with the same function are named the same everywhere. If an area is called “My account” once, it is not called “My area” on the next page and “Customer account” in the footer.
That sounds obvious and is not. It breaks regularly when a website grows over years and different people create content. The W3C names the benefit: repeated functions are recognised more easily and the website is easier to learn. Everyone profits, especially people with cognitive impairments and screen reader users who remember an order.
Menu items nobody understands
Menu labels must explain themselves. An example from Rheinwerk: a shop for baby equipment has a category “On the go” with prams and car seats. For the owner that is logical. For the customer looking for a child seat it is invisible. They do not look under “On the go”.
That is no barrier in the legal sense, just a lost customer.
How users would group your content, you find out with card sorting. According to the Nielsen Norman Group it is a user research method for finding out how users organise information in their heads, so that they find their way around the website better. You write all pages on cards and let people from the target group sort them into groups and name them.
Practical for small businesses: ask three customers under which menu item they would look for a certain piece of information. Not “Do you like it?” but “Where would you click if you want to know what a check costs?”
Jump links on long pages
On long pages jump links help, a small table of contents at the top leading to the sections:
<h2 id="process">What the process looks like</h2>
...
<p><a href="#process">To the process</a></p>
Every jump target needs a unique id. Duplicate identifiers on one page make the jump go nowhere or land in the wrong place. On WordPress pages with repeatedly used blocks this happens more often than you think.
How to check it yourself
- The link list. The quickest and most telling test. With NVDA: NVDA+F7. Without a screen reader, skim your page and read only the highlighted words. Does that make a sensible list?
- The read-aloud test. Imagine someone reads you only the link texts of your home page. Would you know what this website offers?
- The underline check. Go through your running text and check whether links would be recognisable without colour perception. The grey-scale mode in the browser’s developer tools shows it at once.
- The search for
target="_blank". Count how many links open a new window, and ask for each: why, actually? - The menu question to real people. No tool, but the most effective check of all.
What you can do
- Start with the repetitions. Collect all “Learn more”, “Read on” and “Click here” on a list and replace them. Where there are many, it is mostly down to one block used everywhere. Then one change in one place is enough.
- Make headings into links instead of putting links under headings.
- Restore the underline in running text. If it bothers you, style it.
- Reduce new windows to the cases where there is a reason, and announce them.
- Clear away superfluous
aria-label. They are well meant and break voice input. - If you are working on the structure anyway: the naming in the menu has, in my experience, the biggest lever on enquiries. A menu that speaks your customers’ language instead of your own works more strongly than any search engine optimisation on the same page.
Sources
- W3C, Understanding SC 2.4.4: Link Purpose (In Context) — purpose of a link from the link text or context, Level A: w3.org(external site: w3.org)
- W3C, Understanding SC 2.4.9: Link Purpose (Link Only) — purpose from the link text alone, Level AAA: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.1: Use of Color — colour never as the only means: w3.org(external site: w3.org)
- W3C, Understanding SC 2.5.3: Label in Name — the visible text is in the name, the visible label triggers voice control: w3.org(external site: w3.org)
- W3C, Understanding SC 3.2.3: Consistent Navigation — repeated navigation in the same order, Level AA: w3.org(external site: w3.org)
- W3C, Understanding SC 3.2.4: Consistent Identification — same function, same name, Level AA: w3.org(external site: w3.org)
- W3C, G201: Giving users advanced warning when opening a new window — a note about a new window: w3.org(external site: w3.org)
- NV Access, NVDA User Guide — NVDA+F7 opens the elements list: download.nvaccess.org(external site: download.nvaccess.org)
- Nielsen Norman Group, Card Sorting: Uncover Users' Mental Models — card sorting as a method: nngroup.com(external site: nngroup.com)
- Rheinwerk, Barrierefreie Webseiten, ch. 8.1 (Navigation) and ch. 6.1 (Farbeinsatz) — who profits from good link texts, download notes, the baby equipment example “On the go”.
- Own testing practice — linking tiles through their heading, styling the underline instead of removing it,
target="_blank"sparingly,rel="noopener", duplicate identifiers with repeated blocks, the three questions to customers on menu naming.