Responsywność

responsive/reflow

The page reads without sideways scrolling at 320 CSS px and 400% zoom; only tables, maps and similar may scroll both ways.

poważnaręczneWCAG 1.4.10 · AAfe-responsive

Dlaczego

People who zoom to 400% on a 1280px screen see the page at 320 CSS px. If lines run off the side they have to scroll back and forth for every line, and content cut off by fixed widths, sticky bars or overflow: hidden is lost to them entirely.

Poprawka

Test at a 320 CSS px wide viewport (and 256 px tall for horizontal scripts): nothing may need horizontal scrolling except parts that need two dimensions (data tables as a whole, maps, diagrams, video, code). Fix with fluid widths, wrapping flex and grid, min-width: 0 on flex children, overflow-wrap: anywhere for long strings, and smaller sticky headers on short screens.

Przykłady

// In DevTools at 320 px wide: list the elements wider than the page
[...document.querySelectorAll('body *')].filter((el) => el.getBoundingClientRect().right > document.documentElement.clientWidth)

Źródła

Fakty

Identyfikator
responsive/reflow
Waga
poważna
Sprawdzanie
ręczne ocenia człowiek; raport podaje to jako listę kontrolną
Dotyczy plików
page
WCAG 2.2
1.4.10, poziom AA
Uczy jej skill
fe-responsive Responsive design
Od wersji
0.1.0

Plik reguły na GitHubie

Przeczytaj w terminalu

npx github:dawidolko/frontend-skills explain responsive/reflow