Skip to main content
Raasta
SeriousWCAG 2.1.1 · Level Ascrollable-region-focusable

Scrolling area can’t be reached by keyboard

A box that scrolls on its own, such as a wide table, code sample or product row, can’t be scrolled with the keyboard in some browsers unless it, or something inside it, can take focus. Add tabindex="0" with a role and label to the scrolling element, or make sure it contains a focusable element.

Who it hurts

Keyboard users, including people who can’t use a mouse or trackpad.

Size charts, comparison tables and terms boxes on small screens often hide content off to the side, out of keyboard reach.

How to fix it

Pick your stack. Review every change before you ship it.

Before

<div class="table-wrap" style="overflow-x: auto">
  <table>…</table>
</div>

After

<div class="table-wrap" style="overflow-x: auto" tabindex="0" role="region" aria-label="Size chart">
  <table>…</table>
</div>

Check it by hand too

Tab to the scrolling area and use the arrow keys. All of its content should come into view, and the focus outline should be visible.

Automated checks find a large share of accessibility problems, but not all of them. Passing this check does not on its own make a page compliant.

WCAG reference