demo · v132

Six scroll containers — which ones get tab focus?

The spec gives Chrome a rule, not a single decision. A scroller becomes keyboard-focusable when it has scrollable overflow AND no descendant takes that focus on its behalf. Walk all six cases with Tab and the verdict next to each container fills in.

1. scrolls, no children focusable

no tabindex, overflow: auto with content larger than box
awaiting tab

2. scrolls, has focusable child

child <button> takes the focus instead
awaiting tab

3. scrolls, tabindex="-1"

explicit opt-out
awaiting tab

4. no overflow (content fits)

overflow: auto but content smaller than box
only one line
awaiting tab

5. overflow: hidden

no scrolling possible — not a scroll container
awaiting tab

6. explicit tabindex="0"

opt-in (was the workaround before 132)
awaiting tab
expectations: 1, 6 get focus; 2 forwards to its child; 3 opted out; 4 and 5 aren't scroll containers.
focused element: (none)

see also