Sub topic 12
Planning text alternatives and meaningful link text
This chapter assumes you know the basics of WCAG (Web Content Accessibility Guidelines) and POUR, and that you can read simple HTML. It also assumes you have already sketched page structure and reading order. Here you plan the words that stand in for images, icons and controls, and the text of links and buttons. All of this can be decided in a wireframe, before any visual design exists.
Why plan this at the wireframe stage
A text alternative is a text equivalent of non-text content. Screen readers announce it aloud, braille displays show it, and it appears when an image fails to load. It supports WCAG 1.1.1 Non-text Content (Level A). Link and button text supports 2.4.4 Link Purpose (In Context) (Level A) and 2.5.3 Label in Name (Level A). The stricter 2.4.9 Link Purpose (Link Only) is Level AAA.
A wireframe usually shows an image as a gray box with an X. That box hides an important decision: does the image carry information, or is it decoration? If nobody answers that during wireframing, developers often guess. They either leave out the alternative or write something like "image123.jpg".
Decide the role of every non-text element
Give each image, icon, chart and media element one of five roles. Write the role in an annotation next to it.
| Role | Meaning | Text alternative |
|---|---|---|
| Informative | Conveys a fact or mood needed to understand the page | Short description of the information |
| Decorative | Adds visual interest only | Empty alternative, so assistive technology skips it |
| Functional | Is inside a link or button and is its only content | Describes the action or destination, not the picture |
| Complex | A chart, diagram or map with detailed data | Short alternative plus a longer description or data table nearby |
| Text in an image | Words rendered as a picture | The same words, or avoid it entirely |
Writing good alternatives
The right alternative depends on context. The same photo of a person may need a name on a team page and an empty alternative beside a caption that already names them.
Follow these rules when you draft alternative text:
- Describe what the image communicates here, not everything visible in it.
- Leave out "image of" and "picture of". Screen readers already announce the element type.
- Keep it short, usually a phrase or one sentence. Move longer explanations into visible page text.
- Do not repeat adjacent text. If a caption says the same thing, mark the image decorative.
- Include any text shown in the image, unless the same text is already on the page.
Compare these alternatives for a product photo on a card whose heading already reads "Trailhead 40L backpack":
| Weak | Better |
|---|---|
| `alt="image"` | `alt="Backpack in green, front view, with side water bottle pocket"` |
| `alt="backpack.jpg"` | `alt=""` if the card text already tells the user everything the photo shows |
Both of the "Better" options can be right. It depends on whether the photo adds information the surrounding text lacks.
Functional images and icon buttons
Icon-only buttons are the most common failure in this area. A magnifying glass has no meaning to a screen reader unless you supply a name. In the wireframe, either add a visible text label or annotate the accessible name.
<button type="submit">
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24">
<circle cx="10" cy="10" r="6" fill="none" stroke="currentColor" stroke-width="2"/>
<line x1="14.5" y1="14.5" x2="21" y2="21" stroke="currentColor" stroke-width="2"/>
</svg>
<span class="visually-hidden">Search</span>
</button>.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}The SVG is hidden from assistive technology, so the button's name comes from the hidden text, "Search". An aria-label on the button would also work. Visible text is better when space allows, because it helps everyone and avoids a mismatch with speech control (see below).
Label in Name
Speech-recognition users activate controls by saying their visible label, such as "click Search". WCAG 2.5.3 requires that the accessible name contain the visible text. If a button shows "Search" but its accessible name is "Find products", the spoken command fails. In your annotation, state that the accessible name starts with the visible label.
Meaningful link text
Screen reader users often pull up a list of all links on a page and scan it out of context. A list reading "Read more, Read more, Read more, Click here" is useless. Link text should describe where the link goes or what it does, so it still makes sense by itself.
| Avoid | Prefer |
|---|---|
| Click here | Download the 2026 pricing guide (PDF, 2 MB) |
| Read more | Read more about the returns policy |
| Learn more (repeated on three cards) | Learn more about the Basic plan |
| https://example.com/a?id=48213 | Order history |
WCAG 2.4.4 allows the link's surrounding context, such as the sentence or the table cell it sits in, to supply the purpose. Designing so that the link text alone works is safer, and it is required at Level AAA.
When a design uses repeated "Read more" links on cards, you have three options:
- Rewrite the link text so each one is unique and descriptive.
- Make the card heading the link and drop the separate "Read more" link.
- Add visually hidden text to the generic link, such as "Read more<span class="visually-hidden"> about the Basic plan</span>".
<article class="card">
<h3><a href="/plans/basic">Basic plan</a></h3>
<p>For individuals getting started. Includes 5 projects.</p>
</article>Option 2 is usually the simplest. It also gives one link per card, which means fewer tab stops for keyboard users.
Other link and button text rules
- Say when a link opens a file or a new window, for example "(PDF)" or "(opens in a new tab)". Put this in the visible text if you can.
- Use the same text for links with the same destination, and different text for different destinations (WCAG 3.2.4 Consistent Identification, Level AA, covers consistent naming for components with the same function).
- Use links for navigation and buttons for actions. The wireframe should show which one each element is, because the text you write follows from that. "Delete account" is a button. "Account settings" is a link.
- Begin button text with a verb: "Save changes", "Add to basket".
- Do not rely on an underline or color to show that text is a link without another cue. The "Adding cues beyond color" chapter covers this.
Images of text, captions and media
Avoid text baked into images. It cannot be resized, restyled or translated, and it blurs when zoomed. WCAG 1.4.5 Images of Text (Level AA) allows it only for logos or when the presentation is essential. In a wireframe, mark banners and buttons as real text.
For media, plan these items now because they affect layout:
- Video with speech needs captions, and it needs a transcript if it is important content. Reserve space for a caption area and a visible captions toggle.
- Audio-only content needs a transcript link.
- Video where visuals carry information that speech does not describe needs audio description or an equivalent text version.
- Charts need a nearby data table or a text summary of the trend, for example "Sales rose 12% between March and June".
Annotating text alternatives
Add a short note to each non-text element in the wireframe. A consistent format helps developers and testers read it fast:
<!-- Annotation for hero image on landing page -->
<img src="hero-team.jpg" alt="">
<!-- Role: decorative. Heading below already states the topic. -->
<!-- Annotation for logo link in header -->
<a href="/"><img src="logo.svg" alt="Northwind home"></a>
<!-- Role: functional. Name begins with visible brand text. -->Common mistakes
- Leaving the alt attribute off entirely. A missing attribute makes some screen readers read the file name. An empty
alt=""is the correct way to say "decorative". - Describing appearance rather than purpose on a functional image. A logo link should say where it goes, not "blue circle with a letter N".
- Putting the same sentence in
altand in a caption directly under the image. - Using
titleas the only name. It is not reliably exposed on touch devices or to keyboard users. - Writing very long alternatives. Past roughly 150 characters, move the content to visible text.
Exercise
Exercise
A wireframe shows a product grid. Each card has a photo, the product name as a heading, a price, and a "Read more" link. The photo of the "Trailhead 40L backpack" shows the same backpack the heading names. Propose the role and text alternative for the photo, and a fix for the repeated "Read more" links.
Show answer
Photo: if it shows only what the heading already states, mark it decorative with alt="". If colour or features matter to buyers and are not in the text, make it informative, for example alt="Green backpack with side water bottle pocket". Links: make the product name heading the link and remove the separate "Read more", or change the text to "Read more about the Trailhead 40L backpack" (visible or visually hidden). This gives each link a unique, descriptive purpose and avoids repeated generic names in a link list.
Exercise
A header has a button showing only a bell icon. The visible design adds no text. What should the accessible name be, and what rule from this chapter would break if you named it "Alerts panel" while the wireframe shows the visible label "Notifications" next to the icon on desktop?
Show answer
Name it "Notifications" so it matches the visible label. Naming it "Alerts panel" breaks Label in Name (WCAG 2.5.3), because a speech-recognition user who says "click Notifications" would not activate it. The icon itself is hidden from assistive technology so the name is not announced twice.