Rule

Keyboard-reachable scroll areas

Scrollable regions must be reachable by keyboard.

Rule
scrollable-region-focusable
WCAG 2.2
2.1.1 Keyboard (opens in a new tab) (Level A)
2.1.3 Keyboard (No Exception) (opens in a new tab) (Level AAA)
Severity
Serious

What it checks

Any element whose content overflows it, on an axis set to overflow: auto or overflow: scroll, is a scrollable region. It passes when it can take keyboard focus itself, with tabindex="0", or when it holds a link, button, field or other element the Tab key can reach, since moving focus inside it scrolls it. Content in open shadow roots and slotted content count.

The <html> and <body> elements are left alone, because the browser scrolls the page with the arrow keys. So are regions with no width or height, and overflow that is hidden rather than scrollable.

When a person decides

This rule never fails. A region with nothing tabbable inside is sent for review: Chromium puts such a region in the tab order by itself, but not every browser does, so whether it can be reached depends on the browsers the page supports. A region with tabindex="-1" is reviewed too. It is out of the tab order, but a control elsewhere on the page might scroll it or move focus into it.

Example

Sent to review

<style>.notes { height: 4em; overflow: auto; }</style>
<div class="notes">
  <p>Delivery takes three to five working days.</p>
  <p>Returns are free within thirty days.</p>
  <p>Refunds reach the original card within a week.</p>
</div>

Passes

<style>.notes { height: 4em; overflow: auto; }</style>
<div class="notes" tabindex="0" role="region" aria-label="Delivery notes">
  <p>Delivery takes three to five working days.</p>
  <p>Returns are free within thirty days.</p>
  <p>Refunds reach the original card within a week.</p>
</div>

The engine is tested against both examples.

How to fix it

Add tabindex="0" to the region, with role="region" and an aria-label that names it, or put a focusable control inside it.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.