Skip to content
easeweb
Search topics

Pages that scroll sideways on a narrow screen

A card grid whose columns can't shrink below 320 pixels doesn't fit a 320-pixel screen once the page's padding is added, so every card runs off the right edge.

WCAG 2.2
SC 1.4.10AA· new in 2.1
Required by
EN 301 549 (EU)
Broken
The cards run off the screen.
The accessibility problem illustrated.
01

The problem

People who zoom in to read have to scroll sideways to read every line, and can miss what is past the edge.

02

Try it

Zoom the page to 400% and read the classes.

Drag the Zoom slider. The window stays 1280 pixels wide, so at 400% the page has 320 CSS pixels. Do the cards still fit?

100%

Broken Can you fix this?

Classes this month

  • Wheel basics

    Saturday 14 November, 10:00 to 13:00

    $65

    Book
  • Glazing

    Sunday 15 November, 14:00 to 16:00

    $65

    Book
  • Hand building

    Saturday 21 November, 10:00 to 12:00

    $65

    Book

Page width: 1280 CSS pixels. Fits: no sideways scrolling.

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Wrap the column minimum in min(100%, …), so a column is never wider than its container.

  1. 1Never give a column or container a minimum width wider than 320 pixels minus the padding around it.
  2. 2Let images, embeds and long words shrink or break to fit.
  3. 3Only tables, maps, diagrams, code and media may scroll sideways, and then inside their own box.
Before A grid with a fixed minimum column width
<main class="page">  <h1>Classes this month</h1>  <ul class="classes">    <li class="class-card">      <h2>Wheel basics</h2>      <p>Saturday 14 November, 10:00 to 13:00</p>      <p class="price">$65</p>      <a href="/classes/wheel-basics" class="book">Book</a>    </li>    <!-- Glazing, Hand building -->  </ul></main>
After

Cap the column minimum at the container width

<main class="page">  <h1>Classes this month</h1>  <ul class="classes">    <li class="class-card">      <h2>Wheel basics</h2>      <p>Saturday 14 November, 10:00 to 13:00</p>      <p class="price">$65</p>      <a href="/classes/wheel-basics" class="book">Book</a>    </li>    <!-- Glazing, Hand building -->  </ul></main>

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

5 checks, no mouse.

Test with: Zoom, Keyboard

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared layout or grid styles change.

Limits

This is a starting pattern, not a guarantee for every application. Passing at 320 pixels doesn't make a layout good at 320 pixels: check that the reading order still makes sense once the columns stack, and that nothing important has been pushed far down the page. Paths and class names in the snippets are placeholders. Test every page template, not only the one with the card grid.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work