CodePark/ questions / Contrast, motion & zoom
START PRACTICINGPRACTICE
Frontend question · Accessibility › Contrast, motion & zoom

What does WCAG ask for zoom and reflow? Which CSS habits break it?

Users with low vision often zoom the page to 200% or 400%. The layout must keep working.

The WCAG rules (all level AA):

  • 1.4.4 Resize Text: text can grow to 200% without content being cut off or lost.
  • 1.4.10 Reflow: content works at a width of 320 CSS pixels without scrolling sideways. That equals a 1280px-wide window zoomed to 400%. Things that need two directions, like maps and big data tables, are excused.
  • 1.4.12 Text Spacing: nothing breaks when users increase line height, letter spacing, word spacing and paragraph spacing.

CSS habits that break it:

  • Fixed heights on boxes with text, such as height: 40px. The text overflows or gets cut off when it grows. Use min-height or padding.
  • overflow: hidden on text containers, which hides the overflow.
  • Fixed-width layouts like width: 1200px, instead of flexible widths and media queries.
  • Font sizes in px only. They ignore the user's browser font-size setting. Use rem.
  • maximum-scale=1 or user-scalable=no in the viewport meta tag. This blocks pinch zoom on mobile.
  • Sticky headers that fill half the screen at 400% zoom.

To test, zoom the browser to 400% and check that you can still read and use everything.

  • Text must resize to 200% without loss of content.
  • Content must reflow at 320 CSS pixels wide without sideways scrolling, which equals 400% zoom.
  • Fixed heights and overflow: hidden on text cause clipping when text grows.
  • Use rem for font sizes and flexible layouts instead of fixed pixel widths.
  • Never block pinch zoom with user-scalable=no or maximum-scale=1.