Barrierepruefung.de Web Accessibility Checker

Horizontal scrolling at 200% zoom

The finding means that at 200% zoom content extends past the edge of the window and can only be reached by scrolling sideways, or not at all. Fixed widths, a body with min-width or navigation that does not wrap are the usual reasons. A layout that adapts to any width without reloading fixes it.

Last reviewed: Sources

The message

Identifier
own.zoom-200
Type of check
automatic
Severity
serious
Success criterion
Meaning
At twice the size only half the width remains. Content extends beyond it and can only be reached by scrolling horizontally.
Impact
People who must enlarge in order to read then have to scroll back and forth for every line, which makes reading unreasonable.
Fix
Let the layout reflow with the available width and avoid fixed widths in pixels.

How does your website stand?

The free check shows what can be measured automatically, with the location. No account.

Check website for free

What the rule checks

Zooming the browser to 200% halves the width available to the page in CSS pixels. The rule reproduces exactly that: once the page has been checked in the desktop window, it narrows the window to half its width without reloading the page, just as zooming does. It then measures the same way as the check at 320 pixels: if the document is wider than the window, it reports the outermost elements that extend beyond the right edge. Elements inside a region that scrolls horizontally on its own are not reported. If the page reloads by itself when narrowed, the rule measures once more in the new document.

1.4.4 Resize Text (Level AA) requires that text can be enlarged to 200% without loss of content or functionality. Content that sticks out past the edge can only be reached by scrolling sideways, line by line. If the page clips the overflow, it is gone entirely, which the W3C describes as a failure (F69).

Common causes

  • Fixed widths. A container with width: 1200px, or a body with min-width: 1024px, that no longer fits the window at half the width.
  • Bars that do not wrap. A main navigation with many items and white-space: nowrap that only switches to a menu at phone width.
  • Width calculated once on load. A script measures the window width when the page loads and sets fixed widths from it. Zooming does not reload the page, so the layout stays as wide as before.
  • Hidden overflow. overflow-x: hidden on the body prevents scrolling but clips whatever is too wide.

How to fix it

Replace fixed widths with maximum widths, so the content never gets wider than the window:

/* before */
body {
  min-width: 1024px;
}

.page {
  width: 1200px;
}

/* after */
.page {
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

Let bars wrap instead of forcing them onto one line (G146):

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

If a script has to respond to the width, it listens for changes rather than measuring once:

const narrow = window.matchMedia('(max-width: 48rem)');

function adapt() {
  document.body.classList.toggle('compact', narrow.matches);
}

narrow.addEventListener('change', adapt);
adapt();

Remove overflow-x: hidden from the body once the cause of the overflow is fixed. As long as it stays, it hides the defect rather than fixing it.

To check by hand, zoom the page to 200% in a desktop window and scroll all the way down. What applies at 400% is described on the page about WCAG 1.4.10.