Responsive layout
responsive/orientation
The page works in portrait and landscape; it never locks the orientation or asks people to rotate unless one orientation is essential.
seriousmanualWCAG 1.3.4 · AAfe-responsive
Why
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.
Fix
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).
Examples
/* bad */
@media (orientation: portrait) { main { display: none; } .rotate-message { display: block; } }
/* good */
@media (orientation: portrait) { .gallery { grid-template-columns: 1fr; } }Sources
Facts
- Id
responsive/orientation- Severity
- serious
- Check
- manual a person reviews it; the report lists it as a checklist
- Applies to
page- WCAG 2.2
- 1.3.4, level AA
- Taught by the skill
fe-responsiveResponsive design- Since version
- 0.1.0
Read it in the terminal
npx github:dawidolko/frontend-skills explain responsive/orientation