Sub topic 13
Planning for reflow, zoom and small screens
This chapter assumes you know how to produce a wireframe, you recognize common components such as navigation bars, forms and data tables, and you can read basic HTML and CSS. It covers how to plan layouts that stay usable when people zoom, resize text, rotate a device or use a narrow screen. You make most of these decisions in the wireframe, because they depend on structure and order. Fixing them after visual design is expensive.
Why reflow belongs in the wireframe
Many people see your design at a size you did not draw. A person with low vision may zoom a browser to 400%. A person on a phone has a viewport (the visible area of the page) of about 320 to 400 CSS pixels. A person who reads with a larger default font size gets more text per screen than you planned for. A person using a phone in a stand or on a wheelchair mount may be unable to rotate it.
WCAG 2.2 has several success criteria for these cases:
| Criterion | Level | What it requires |
|---|---|---|
| 1.4.4 Resize Text | AA | Text can be resized up to 200% without loss of content or function |
| 1.4.10 Reflow | AA | Content works at 320 CSS pixels wide (vertical scrolling) or 256 CSS pixels high (horizontal scrolling) without two-dimensional scrolling |
| 1.4.12 Text Spacing | AA | Content survives larger line height, paragraph, letter and word spacing |
| 1.3.4 Orientation | AA | Content is not locked to portrait or landscape unless essential |
| 1.4.13 Content on Hover or Focus | AA | Extra content that appears on hover or focus can be dismissed, hovered and persists |
The Reflow criterion is the one that most affects wireframes. A viewport 1280 CSS pixels wide, zoomed to 400%, behaves like a viewport 320 CSS pixels wide. So one narrow layout covers both phone users and zoom users.
Draw the narrow layout, not just the desktop one
A common mistake is to wireframe only a desktop layout and leave the mobile version for later. Draw at least two frames for every key screen:
- A wide layout, around 1280 CSS pixels.
- A narrow layout, 320 CSS pixels wide.
You do not need a frame for every device in between. Layouts that reflow fluidly work at the sizes between your two frames. Add a medium frame only when your layout changes substantially there, for example when a sidebar becomes a top section.
In the narrow frame, check these points:
- Content stacks into a single column.
- Nothing requires horizontal scrolling to read a line of text.
- Navigation is still reachable and still ordered logically.
- No information that appears in the wide layout disappears in the narrow one.
Keep the reading order when columns stack
When a multi-column layout collapses into one column, the visual order becomes the source order. If the wide layout puts a sidebar to the left of the main content, you must decide which comes first in the stack. Chapter 5 covered reading and focus order. The narrow frame is where those decisions become visible.
Decide on the order in the wireframe, then number the regions in the narrow frame. In most cases the main content should come before secondary sidebars, because screen reader users and keyboard users move through the page in source order.
If the visual order and the source order must differ, say so in an annotation. CSS can reorder items visually, but keyboard focus follows the source order. A mismatch makes focus jump around the screen.
Plan components that are hard to reflow
Some components break first at narrow widths. Plan each one in the wireframe.
Navigation
A row of ten links does not fit in 320 pixels. Typical options:
- Collapse the links behind a menu button. The button needs a text label or an accessible name, a clear open and closed state, and a keyboard-operable panel.
- Keep a short set of the most important links visible and move the rest behind a "More" button.
- Stack the links vertically if there are only a few.
Whichever you pick, show the open and closed states of the menu in the wireframe. A hidden state that nobody drew is often built without keyboard support.
Data tables
Tables are the standard exception in WCAG 1.4.10. A table whose meaning depends on its rows and columns may scroll in two dimensions. That exception is narrow, and you should still try to reduce the need for it. Options include:
- Cutting columns that most users do not need.
- Letting the table scroll horizontally inside its own container, and making sure that container can be reached and scrolled with a keyboard.
- Turning each row into a stacked block with the column name repeated beside each value. If you choose this, record in an annotation that the underlying markup should stay a real table or provide equivalent relationships, because the column headers must still be associated with the data.
Forms
Put labels above fields in the narrow layout. Labels placed beside fields run out of room, and long labels or translated text wrap badly. Multi-column forms should become one column. Keep hints and error messages next to the fields they describe, as covered in the forms chapter.
Images and media
Plan for images with text in them. Text inside an image does not reflow or resize with the page. Put text in the page as real text and mention this in the wireframe annotation.
Fixed and sticky elements
Sticky headers, cookie banners and chat widgets take space. At 320 pixels wide and 400% zoom, a sticky header that takes up a third of the viewport leaves little room for content. It can also hide the element that has keyboard focus. In the wireframe, mark the maximum height of fixed elements, and consider letting a sticky header scroll away on narrow screens. WCAG 2.2 criterion 2.4.11 (Focus Not Obscured, Minimum) requires that a focused element is not entirely hidden by author-created content such as a sticky bar.
Leave room for larger text and spacing
Text grows when users change font size, and text spacing grows when users apply their own stylesheets. In the wireframe:
- Do not draw buttons, labels or cards as fixed-size boxes that exactly fit their text. Draw them with slack, and annotate that height should grow with content.
- Leave room for long words and translated strings. German and Finnish labels are often much longer than English ones.
- Avoid placing text over images or inside fixed-height containers where growth would clip it.
Developers can support this by using relative units such as rem and em for text and spacing, and by avoiding fixed heights on text containers.
html {
font-size: 100%;
}
body {
font-size: 1rem;
line-height: 1.5;
}
.card {
padding: 1rem;
min-height: 0;
max-width: 40rem;
overflow-wrap: anywhere;
}
.layout {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.layout > main {
flex: 1 1 20rem;
}
.layout > aside {
flex: 1 1 14rem;
}With flex-wrap and a flexible basis, the sidebar sits beside the main content when there is room and drops below it when there is not. No device-specific breakpoint is needed. The source order, main first and aside second, stays the reading order in both cases.
Do not lock orientation
Some users mount a device in one orientation. If your wireframe shows an app only in portrait, ask whether that is essential. A check-deposit camera view may be. A settings page is not. Draw landscape frames for any screen where a layout problem is likely, usually a screen with a fixed bottom bar and a keyboard open.
Watch for hover and focus popovers
Tooltips, mega menus and hover cards are hard on small screens, where there is no hover. WCAG 1.4.13 asks that content revealed by hover or focus can be dismissed without moving the pointer (usually with Escape), that the pointer can move over the new content without it vanishing, and that it stays visible until the user dismisses it or the trigger loses focus. In the wireframe, prefer content that is visible by default or opens with an explicit button press. If you use a hover or focus popover, annotate how it is dismissed.
Annotate reflow in the wireframe
Add reflow notes to each key screen. A short list is enough:
- Layout at 320 px: single column, order as numbered.
- Navigation: collapses to a labeled menu button, with open and closed states drawn.
- Table: scrolls inside a focusable container, or stacks with labeled values.
- Text containers: heights grow with content, no clipping.
- Orientation: portrait and landscape both supported.
- Zoom: pinch zoom enabled, usable at 400%.
- Fixed elements: maximum height, and behavior on narrow screens.
Check the plan early
You can test a low-fidelity design without code. Take your 320-pixel frame and ask:
- Can I read every line of text without scrolling sideways?
- Is the order of regions the same as the order I annotated?
- Is every control from the wide layout still present?
- If a label doubles in length, does anything break?
- Is any control hidden behind a state I have not drawn?
Once a coded prototype exists, you can confirm these in a browser. Set the window to 1280 pixels wide, zoom to 400%, and use only the keyboard to move through the page. Then change the browser's default font size to a larger value and repeat. If a line needs horizontal scrolling or a focused control disappears behind a sticky bar, return to the wireframe and fix the structure.
Exercise
A wireframe shows a desktop page with a left sidebar of filters and a main list of results. The team's narrow frame stacks the filters above the results. Name two accessibility questions you would raise about this plan, and one change you might propose.
Show answer
First, the filters now come before the results in the reading and focus order, so keyboard and screen reader users must pass through every filter control before reaching the results. Second, on a 320-pixel screen the filters could take most of the first screen, which pushes the results out of view. A reasonable change is to put the results first in the source order, and place the filters behind a clearly labeled "Filters" button that opens a panel with keyboard support, a visible focus indicator and a way to close it. The open and closed states should be drawn in the wireframe.
Exercise
A user zooms a browser window that is 1280 CSS pixels wide to 400%. Which equivalent viewport width is the layout rendered at, and which WCAG criterion checks that it does not need two-dimensional scrolling?
Show answer
The layout is rendered as if the viewport were 320 CSS pixels wide (1280 divided by 4). WCAG 1.4.10 Reflow checks this, with an exception for content such as data tables, maps and diagrams that need two-dimensional layout.