Responsywność

responsive/orientation

The page works in portrait and landscape; it never locks the orientation or asks people to rotate unless one orientation is essential.

poważnaręczneWCAG 1.3.4 · AAfe-responsive

Dlaczego

Some people have their tablet or phone mounted in one orientation (on a wheelchair, for example) and cannot turn it. A "please rotate your device" screen, a CSS rotation trick or screen.orientation.lock() shuts them out.

Poprawka

Let the layout adapt to both orientations with fluid layout and media or container queries. Remove rotate-your-device overlays, @media (orientation: portrait) rules that hide the main content, and orientation locks in scripts or the web app manifest, unless the orientation is essential (a piano app, a bank cheque scan).

Przykłady

/* bad */
@media (orientation: portrait) { main { display: none; } .rotate-message { display: block; } }
/* good */
@media (orientation: portrait) { .gallery { grid-template-columns: 1fr; } }

Źródła

Fakty

Identyfikator
responsive/orientation
Waga
poważna
Sprawdzanie
ręczne ocenia człowiek; raport podaje to jako listę kontrolną
Dotyczy plików
page
WCAG 2.2
1.3.4, 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/orientation