Responsive layout

responsive/reflow

The page reads without sideways scrolling at 320 CSS px and 400% zoom; only tables, maps and similar may scroll both ways.

seriousmanualWCAG 1.4.10 · AAfe-responsive

Why

People who zoom to 400% on a 1280px screen see the page at 320 CSS px. If lines run off the side they have to scroll back and forth for every line, and content cut off by fixed widths, sticky bars or overflow: hidden is lost to them entirely.

Fix

Test at a 320 CSS px wide viewport (and 256 px tall for horizontal scripts): nothing may need horizontal scrolling except parts that need two dimensions (data tables as a whole, maps, diagrams, video, code). Fix with fluid widths, wrapping flex and grid, min-width: 0 on flex children, overflow-wrap: anywhere for long strings, and smaller sticky headers on short screens.

Examples

// In DevTools at 320 px wide: list the elements wider than the page
[...document.querySelectorAll('body *')].filter((el) => el.getBoundingClientRect().right > document.documentElement.clientWidth)

Sources

Facts

Id
responsive/reflow
Severity
serious
Check
manual a person reviews it; the report lists it as a checklist
Applies to
page
WCAG 2.2
1.4.10, level AA
Taught by the skill
fe-responsive Responsive design
Since version
0.1.0

Rule file on GitHub

Read it in the terminal

npx github:dawidolko/frontend-skills explain responsive/reflow