Sub topic 14
Annotating wireframes for handoff
This chapter assumes you know the basics of WCAG (the Web Content Accessibility Guidelines) and its A, AA and AAA levels. It also assumes you can read simple HTML and CSS, and that you have already sketched headings, landmarks, forms and focus order in earlier chapters. Here you will pull those decisions together into annotations a developer can build from.
Why annotations exist
A wireframe shows what is on the screen. It does not show what a screen reader announces, where the Tab key goes next, or what happens when a field fails validation. If that intent stays in your head, the developer guesses. Guesses tend to become defects: a clickable div with no keyboard support, a missing label, an error that appears only in red.
An accessibility annotation is a short, specific note attached to a region or element of a wireframe. It records a requirement that the picture cannot show. Good annotations are testable. A developer should be able to read one and later check, yes or no, whether the built page meets it.
What to annotate
Not every box needs a note. Annotate where visual design alone leaves the behavior ambiguous. These are the usual categories.
| Category | What the annotation states | Example |
|---|---|---|
| Structure | Landmarks and heading levels | "Region: main. Title is h1. 'Recent orders' is h2." |
| Order | Reading order and focus order, when they differ from visual order | "Focus order 1 to 5. Filter panel follows results in the DOM." |
| Keyboard | Keys and behavior for each interactive element | "Enter or Space opens the menu. Esc closes it and returns focus to the trigger." |
| Focus | Where focus moves after a change | "On dialog open, focus moves to the dialog title." |
| Names | Accessible names for controls, links and images | "Icon button name: 'Close filters'." |
| Forms | Label, hint, required state, error text | "Error: 'Enter an email address in the format [email protected].'" |
| Non-color cues | The second signal besides color | "Error state uses red border, icon and text." |
| Contrast and size | Pairs to check and minimum target size | "Link text on gray panel must reach 4.5:1." |
| Reflow | What changes at narrow widths or 400% zoom | "Table becomes a stacked list below 320 CSS px." |
| Text alternatives | Alt text or a decision to mark decorative | "Chart: alt gives the trend. Data table linked below." |
A numbered marker system
Use numbered markers on the wireframe and put the text in a list beside it or in a linked layer. Numbers keep the wireframe readable. They also let you refer to a requirement in a ticket ("see note 4 on the checkout wireframe").
Keep the marker style distinct from other design notes. Many teams use one color and shape for accessibility, for example a purple circle, and a different one for content or business notes. Do not rely on the color alone to tell them apart, in keeping with the rule you applied to the interface itself. A letter prefix such as "A11y 4" works.
Each note should follow a consistent pattern:
- Target: which element or region it applies to.
- Requirement: what must be true.
- Reason or criterion: the WCAG success criterion or user need, so the developer knows what is negotiable and what is not.
For example: "Search field. Needs a persistent visible label, not placeholder text only. Criteria: 1.3.1 Info and Relationships, 3.3.2 Labels or Instructions."
Writing notes developers can use
Vague notes cause the same problems as no notes. Compare the two columns.
| Vague | Specific |
|---|---|
| "Make this accessible." | "Menu button toggles a list of links. Name: 'Account'. Announces expanded or collapsed." |
| "Good contrast." | "Body text #595959 on #FFFFFF. Check at least 4.5:1." |
| "Keyboard friendly." | "Tab reaches each tab list once. Arrow keys move between tabs. Tab then moves into the panel." |
| "Add alt text." | "Product photo: alt names the product and color. Decorative divider: empty alt." |
Two habits help. First, write the observable result, not the implementation. "Focus returns to the 'Delete' button after the dialog closes" is a result. "Call .focus() in the callback" is an implementation, and the developer may have a better one. Second, give the exact wording for anything a user reads: error messages, button names, and labels. Wording is a design decision, and leaving it to the developer produces messages like "Invalid input".
From wireframe to markup
You can keep the translation in mind as you annotate. The structure note in the first example below maps almost directly to landmarks and headings.
<header>
<nav aria-label="Main">…</nav>
</header>
<main>
<h1>Order history</h1>
<section aria-labelledby="recent-heading">
<h2 id="recent-heading">Recent orders</h2>
…
</section>
</main>
<footer>…</footer>The annotation "Region main contains h1 'Order history' and a section headed by h2 'Recent orders'" is enough for a developer to produce this. You did not have to write the markup, only the intent.
A form annotation works the same way. This field needs a label, a hint and a specific error message, all tied to the input:
<label for="email">Email address</label>
<p id="email-hint">We will send your receipt here.</p>
<input id="email" name="email" type="email" autocomplete="email"
required aria-invalid="true"
aria-describedby="email-hint email-error">
<p id="email-error">Enter an email address in the format [email protected].</p>Your annotation lists four things: the visible label text, the hint text, the error text, and the error trigger (for example, "on submit, and again on blur after the first failure"). The developer chooses the attributes. The next chapter covers how native HTML elements should be preferred over ARIA when they exist.
Some requirements are best expressed as CSS-level values, because they are numbers. You can state them in the annotation and the developer can apply them as shown:
:focus-visible {
outline: 3px solid #005fcc;
outline-offset: 2px;
}
button,
[role="button"] {
min-width: 24px;
min-height: 24px;
}The matching annotation reads: "All interactive elements show a 3 px focus outline with at least 3:1 contrast against adjacent colors. Targets are at least 24 by 24 CSS px, or have enough spacing around them (WCAG 2.2, 2.5.8 Target Size (Minimum))."
Annotating the flow, not just the screen
Many barriers happen between states. A single static wireframe cannot show that a dialog opens, that a list updates after filtering, or that a save succeeds. Annotate transitions explicitly.
Since a diagram is clearer for this, use the following one.
For each transition, record four facts: the trigger, the focus destination, what is announced (if anything), and how the user reverses it. For live updates, such as "12 results found" after a filter, say whether it should be announced politely or not at all. Overusing announcements is its own barrier.
Checking contrast in annotations
When you state a color pair, verify it before the note leaves your hands. A short script avoids mental arithmetic and gives you a number to put in the note.
function channel(value) {
const s = value / 255;
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
}
function luminance([r, g, b]) {
return 0.2126 * channel(r) + 0.7152 * channel(g) + 0.0722 * channel(b);
}
function contrastRatio(rgbA, rgbB) {
const [light, dark] = [luminance(rgbA), luminance(rgbB)].sort((a, b) => b - a);
return (light + 0.05) / (dark + 0.05);
}
// Black on white gives 21. Normal text needs at least 4.5.
console.log(contrastRatio([0, 0, 0], [255, 255, 255]));Thresholds to record: 4.5:1 for normal text, 3:1 for large text, and 3:1 for UI component boundaries and focus indicators. In grayscale wireframes, note "final colors to be checked at visual design" rather than inventing numbers you cannot yet confirm.
Common mistakes
- Annotating everything. Fifty notes on one screen get skimmed. Mark exceptions and non-obvious behavior, and put repeated patterns (such as every text field) in a shared component note.
- Annotating late. Notes added after visual design tend to describe what exists rather than what is needed. Add them while the wireframe is still cheap to change.
- Conflicting orders. If visual order and focus order differ, say which is intended and why. Unexplained mismatches often get "fixed" in the wrong direction.
- Placeholder as label. A note that says "Label: Email" next to a field drawn with placeholder text is ambiguous. State "persistent visible label above the field".
- No owner for open questions. If you do not know the answer, write "Open: who decides the timeout warning?" and assign it, so it does not silently vanish.
A short annotation checklist
Before handoff, check that each screen has these:
- Landmarks and heading levels noted.
- Focus order noted where it is not plain top-to-bottom, left-to-right.
- Keyboard behavior for every custom or composite control.
- Accessible names for icon-only controls and ambiguous links.
- Exact label, hint and error text for every form field.
- A non-color cue for every state conveyed by color.
- Focus destination for every state change that opens, closes or replaces content.
- Reflow behavior at narrow widths.
Exercise
A wireframe shows an icon-only trash button on each row of a table of saved addresses. Write one annotation for it that a developer could test. Include the target, the requirement, and the criterion, and say where focus goes after a row is deleted.
Show answer
Target: trash icon button in each address row. Requirement: the button has an accessible name that identifies the row, for example "Delete 12 Main Street". It is reachable with Tab and activates with Enter and Space. It is at least 24 by 24 CSS px and shows a visible focus outline. After deletion, a message "Address deleted" is announced, and focus moves to the next row's delete button, or to the table heading if no rows remain, so focus is not lost to the top of the page. Criteria: 4.1.2 Name, Role, Value; 2.1.1 Keyboard; 2.4.7 Focus Visible; 2.5.8 Target Size (Minimum); 4.1.3 Status Messages.
Exercise
Why is the note "Use good contrast for the error message" a weak annotation, and how would you rewrite it for a grayscale wireframe?
Show answer
It names no pair of colors, no threshold and no way to check it. Rewrite: "Error text must reach at least 4.5:1 against its background, and it is shown with an icon and text, not red alone. Final colors to be verified at visual design with a contrast checker." This states a testable ratio, adds a non-color cue, and admits that actual colors are not yet chosen.