Sub topic 10
Labels that say what happens next
This chapter assumes you can write basic HTML and CSS and know the difference between a button and a link from the earlier chapters. A control can look clickable and still fail if its label does not tell people what will happen. This chapter covers how to write labels for buttons and links that predict the result of the click.
A label is a promise
A label is the text on a control. Before clicking, the user reads it and forms a guess about the outcome. If the result matches the guess, the user keeps going with confidence. If it does not, they hesitate, go back, or make a mistake.
Good labels do three things:
- They name the action or the destination.
- They make sense without the text around them.
- They match what the element does: a button label describes an action, and a link label describes a place or a resource.
Buttons: start with a verb
A button performs an action, so its label should say which action. Use a verb, and add the object when the verb alone is vague.
| Weak label | Better label | Why it is better |
|---|---|---|
| Submit | Create account | Names the result, not the mechanism |
| OK | Delete project | Confirms exactly what is being confirmed |
| Yes | Discard changes | Still makes sense if the question is not read |
| Click here | Download report | Says what you get |
| Go | Search flights | Names the object |
Keep labels short, usually one to four words. Use the same wording the page uses elsewhere. If the heading says "Sign up", do not label the button "Register".
Links: describe the destination
A link navigates, so its label should describe where it goes or what it opens. People often scan a page by its links alone. Screen reader users can also pull up a list of every link on a page, where each label appears with no surrounding text. Labels like "click here" or "read more" are useless in that list.
<!-- Weak: the label means nothing out of context -->
<p>To see our pricing, <a href="/pricing">click here</a>.</p>
<!-- Better: the label names the destination -->
<p>Compare plans on the <a href="/pricing">pricing page</a>.</p>When a design requires repeated short labels, such as "Read more" on every card, give each link a unique accessible name. Put the extra words in visually hidden text, or use aria-label if the visible text must stay short. The accessible name must still contain the visible label text, so voice-control users can say what they see.
<article>
<h3>Spring release notes</h3>
<p>New filters, faster search, and a redesigned dashboard.</p>
<a href="/blog/spring-release" aria-label="Read more: Spring release notes">Read more</a>
</article>Say when something leaves the page
If a link opens a file, another site, or a new tab, say so. A surprise is a failed prediction.
<a href="/guides/setup.pdf">Setup guide (PDF, 2 MB)</a>
<a href="https://example.org/spec" target="_blank" rel="noopener">
Read the specification (opens in a new tab)
</a>The same applies to buttons with side effects that are not obvious. "Pay $49.00" is clearer than "Continue" on the last step of a checkout.
Labels and the destructive case
When an action cannot be undone, the label carries extra weight. Compare these two confirmation dialogs.
- "Are you sure?" with buttons "Yes" and "No".
- "Delete 14 photos? This cannot be undone." with buttons "Delete photos" and "Keep photos".
The second version works even if the user skips the question. Each button label states its own outcome.
Check the label against the element
Label and element type must agree. A "Go to settings" label on a <button> that only navigates, or a "Save" label on an <a>, mixes the two models and breaks keyboard and screen reader expectations. If the control navigates, use a link and a destination label. If it acts, use a button and a verb label. You can still give a link button styling when it navigates, as in earlier chapters.
Common mistakes
- Using "Click here" or "Learn more" as the only text of a link.
- Labeling buttons "Submit", "OK", or "Yes" when a specific verb is available.
- Changing the label's wording between pages for the same action.
- Hiding the destination type, such as a download or a new tab.
- Putting an icon alone on a control with no accessible name. Add visible text or an
aria-label.
Exercise
A product page has a link labeled "Click here" that downloads a 3 MB PDF manual for the X200 vacuum. Rewrite the label so it predicts the result and makes sense in a list of links.
Show answer
Use something like "Download the X200 manual (PDF, 3 MB)". It names the destination or resource, states the file type and size, and works without the surrounding sentence.
Exercise
A delete dialog shows the buttons "Yes" and "No". Rewrite both buttons for a dialog that deletes a user's saved address.
Show answer
Use "Delete address" and "Keep address". Each label states its own outcome, so the dialog is clear even if the user does not read the question.