Skip to content
easeweb
Search topics

Full-page sections that Page Down and Space can't move

A script changes full-screen sections on wheel and swipe events and locks the page, so Space, Page Down and the arrow keys move nothing.

WCAG 2.2
SC 2.1.1A
Required by
Section 508 · EN 301 549 (EU)
Broken window.addEventListener('wheel', …)
The accessibility problem illustrated: Motor:How do I get to the next screen?
01

The problem

Keyboard users see the page's first screen and can't bring the next ones into view

02

Try it

Click the page, then reach every section from the keyboard

A mouse wheel or a swipe moves the page. Do Space, Page Down and the arrow keys? Press Tab too, and watch which sections you pass. Then apply a fix and try again.

Broken Can you fix this?

BrokenFull-screen sections that change on the wheel

Aster One

Headphones that fold flat.

Thirty hours on one charge

Ten minutes of charging gives you three more.

Made to be mended

Every part can be replaced, and the repair guide is free.

$199

Free delivery and 30 days to return them.

Order now

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Let the keyboard move the page as the wheel does

Before
BrokenFull-screen sections that change on the wheel
<main class="screens">  <section>    <h1>Aster One</h1>    <p>Headphones that fold flat.</p>  </section>  <section>    <h2>Thirty hours on one charge</h2>    <p>Ten minutes of charging gives you three more.</p>  </section>  <section>    <h2>Made to be mended</h2>    <p>Every part can be replaced, and the repair guide is free.</p>  </section>  <section>    <h2>$199</h2>    <p>Free delivery and 30 days to return them.</p>    <a href="/order">Order now</a>  </section></main>
What is wrong4 points
  • overflow: hidden on html and body leaves the browser nothing to scroll, so Space, Page Down, the arrow keys, Home and End move nothing.
  • Only the wheel and a swipe call show(). No key does.
  • Tab goes straight to "Order now", past the two sections with nothing to focus.
  • When it gets there, the browser scrolls the locked body to show the link, and the script's count of sections no longer matches what is on screen.
After

The browser scrolls, and the sections settle into place

<main class="screens">  <section>    <h1>Aster One</h1>    <p>Headphones that fold flat.</p>  </section>  <section>    <h2>Thirty hours on one charge</h2>    <p>Ten minutes of charging gives you three more.</p>  </section>  <section>    <h2>Made to be mended</h2>    <p>Every part can be replaced, and the repair guide is free.</p>  </section>  <section>    <h2>$199</h2>    <p>Free delivery and 30 days to return them.</p>    <a href="/order">Order now</a>  </section></main>
How it is fixed3 steps
  1. Remove overflow: hidden and the script. The page scrolls again, so Space, Page Down, the arrow keys, Home and End all move it, and Tab brings each link into view, with nothing to write.
  2. Put scroll-snap-type: y proximity on html and scroll-snap-align: start on each section. Space and Page Down now land on the next section, as a turn of the wheel did.
  3. Change height to min-height, so a section that needs more room at high zoom or on a small screen grows, and the keys scroll through it.

This fixes the Before and passes 2.1.1 with no script at all. The sections can still animate as they arrive, with an animation tied to the scroll position, which leaves the keys to the browser.

04

Design ideas

A full-screen page can show there is more, and let everyone get there

Six ways to draw the first screen of the headphones page. Look at each before touching it, then put the mouse aside and try it with the keyboard: four go on from the keyboard, and two only with a mouse.

In the design file

  • Draw the first screen at the height of a real window, on a laptop and a phone, and check that something on it shows the page goes on.
  • Keep the cue in sight before anyone scrolls, not only on hover.
  • Draw an arrow or a word as a link to the next section, with its focus ring, at 24 by 24 pixels or more.
  • Write the contrast beside the cue, at least 3:1 for an arrow and 4.5:1 for a word.

Passes

  • Aster One Headphones that fold flat.
    Thirty hours on one charge Ten minutes gives you three more.
    Made to be mended Every part can be replaced.
    $199 Free delivery and 30 days to return them.
    The next section showing at the bottom The first screen stops short of the window, so the next heading sits cut off at the bottom edge and the eye expects more. Nothing extra to draw, and the browser’s scrolling takes the keys. It gives up the look of one perfectly filled screen.
  • A round arrow that is a link A 44px round arrow at the foot of the screen, navy on amber at 9.57:1, in sight from the start. It is a link to the next section, so Tab stops on it and Enter goes there, as a click does.
  • Aster One Headphones that fold flat. Scroll
    The word “Scroll” with a line A quiet editorial look: one small word and a thin line down from it, at 13.95:1 on the paper. The word says what to do, for anyone who wouldn’t read an arrow as an invitation. Like the arrow, it is a link to the next section.
  • Aster One Headphones that fold flat.
    Named sections down the side Battery, Repairs and Price beside the screen say how much there is and what is in it, which an arrow can’t. Each is a link, and a 3px bar marks the current one. It needs room, so on a phone it moves under the screen.

Fails

  • Aster One Headphones that fold flat.
    An arrow that is only a pictureWCAG 2.1.1 The arrow says there is more, and then only the wheel can go there: it can’t be pressed, and no key moves the screen. Turn the wheel over the sample, then try the keys.
  • Aster One Headphones that fold flat.
    Dots that come out on hoverWCAG 2.1.1 A clean screen until the mouse arrives. The dots are real buttons, but while they are hidden they take no focus, so Tab passes them by, and until then nothing shows there is more.
05

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Zoom, Screen reader

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 changing the page's sections or updating the library that moves them.

Limits

This is a starting pattern, not a guarantee for every application. It covers a page whose own scrolling a script has taken over. A page-sized box with overflow-y: scroll is a different failure: its keys do nothing until focus is inside it, as in scrollable areas that a keyboard can't scroll. A long list that loads more as it scrolls is in infinite scroll that moves the footer away as Tab nears it, motion that can't be turned off in animations that ignore the reduced-motion setting, and a focused control under a bar in sticky headers and banners that hide keyboard focus. A link that takes focus out of view while a script holds the page still can't be seen either, as in missing focus indicators on custom buttons; fixing the scrolling fixes that too. The libraries were tested with a keyboard in desktop builds of Chromium, Firefox and WebKit, not in Safari itself, on a phone or with a screen reader.

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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service