Dostępność
a11y/reflow
At 320 CSS pixels wide (400% zoom) content reflows into one column with no horizontal scrolling, except tables, maps and similar.
poważnaręczneWCAG 1.4.10 · AAfe-a11y-visual
Dlaczego
People who zoom to 400% on a laptop see a 320px-wide page. If they must scroll sideways for every line, reading becomes a two-axis search and they lose their place.
Poprawka
Build layouts that wrap: flex-wrap, grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)), max-width instead of width, overflow-wrap: anywhere for long words and URLs. Data tables, maps, diagrams and code may scroll inside their own container (fe-a11y-tables). Test at 320px width or 400% zoom.
Przykłady
/* bad */
.cards { display: grid; grid-template-columns: repeat(3, 300px); }
/* good */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }Źródła
Fakty
- Identyfikator
a11y/reflow- Waga
- poważna
- Sprawdzanie
- ręczne ocenia człowiek; raport podaje to jako listę kontrolną
- Dotyczy plików
cssscsslesspage- WCAG 2.2
- 1.4.10, poziom AA
- Uczy jej skill
fe-a11y-visualContrast, colour, size and reflow- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain a11y/reflow