Link text, context & new windows

A link is a promise about where it goes. People who can see the whole page guess the destination from the surrounding words, the layout, and the visuals. A screen reader user often does not have that luxury: they pull up a list of every link on the page and read it out of context. In that list, ten links that all say “Read more” are ten identical, useless promises. The same user can also be thrown when a link silently swaps their tab out from under them, or when an icon-only link is announced as nothing more than its file name.

This lesson covers the three defects behind most link failures: link text that means nothing on its own, links that open a new window without warning, and image links with no accessible name. Each one is fixed in the markup — the right words, a small piece of honest text, or a real alt — and none of them needs JavaScript.

What you’ll learn

How to write link text that describes its destination so it works out of context; how — and whether — to open a link in a new window, and how to warn the user when you do; and how to give an image or icon link a real accessible name through alt text so it is never announced as a bare URL.

Standards this lesson maps to
Standard Criterion Level What it requires
WCAG 2.2 2.4.4 Link Purpose (In Context) A The purpose of each link can be determined from its text, or from the text together with its programmatic context.
WCAG 2.2 1.1.1 Non-text Content A An image used as a link has a text alternative that conveys the link’s purpose.
WCAG 2.2 4.1.2 Name, Role, Value A Every link exposes an accessible name to assistive technology, never an empty one.
WCAG 2.2 2.4.9 Link Purpose (Link Only) AAA The purpose of each link is clear from its link text alone, without relying on context.
WCAG 2.2 3.2.5 Change on Request AAA Changes of context such as opening a new window happen only on user request, or the user is warned beforehand.
WCAG 2.2 3.2.2 On Input A Activating a control does not cause an unexpected change of context.
EN 301 549 9.2.4.4 / 9.1.1.1 (incorporates WCAG) European harmonised standard; references the WCAG A/AA set including link purpose and non-text content.
Section 508 502.3 / 504 (incorporates WCAG A & AA) US federal ICT must meet WCAG 2.0 Level A and AA, including link purpose in context.
ADA Title II WCAG 2.1 AA (DOJ rule) AA US state/local government web content must conform to WCAG 2.1 AA.

The three problems we’ll fix

Each card below isolates one common link defect. For every issue you get a plain-language statement of the problem, a Bad example (shown as escaped, non-running code so it can’t harm this page), a Good example, the copyable Code, and an ordered fix.

Recap

  • Write link text that describes the destination so it makes sense out of context — never “read more” or “click here” on their own (2.4.4, and 2.4.9 at AAA).
  • Prefer to leave links in the same tab. If a link must open a new window, say so in the link text or with a visible, announced note so the change isn’t a surprise (3.2.5 at AAA; good practice everywhere).
  • Give every image or icon link a real accessible name through alt that states where it goes — never an empty link or a bare file name (1.1.1, 2.4.4, 4.1.2).

The same fixes satisfy WCAG, EN 301 549, Section 508, and ADA Title II at once — name every link by its destination and you meet them all.