1.3.4 Orientation
What it requires
Content and functionality must not be restricted to a single display orientation — such as portrait or landscape — unless a specific orientation is essential. When a user rotates their device, the page should follow and remain fully usable in both orientations. Locking the view forces some people to rotate a device they cannot easily turn.
The exception is narrow: a specific orientation may be required where it is genuinely essential, for example a piano app, a cheque-deposit camera view, or a virtual-reality experience designed for one orientation. Visual preference is not a valid reason to lock.
- People who mount a device in a fixed position — for example, a wheelchair-mounted tablet that is permanently in landscape.
- People with motor or dexterity disabilities who cannot reliably rotate a phone or tablet by hand.
- Users who have set a system-level orientation lock (often for the same access reasons) and find the app fighting it.
- Low-vision users who magnify in one orientation and lose content when the other is forced.
How to detect it
| Check | How | Catches the failure? |
|---|---|---|
| Rotate the device | On a real phone or tablet, rotate between portrait and landscape and confirm content reflows and stays usable in both. | Yes — the primary manual test. |
| Inspect the CSS | Look for @media (orientation: …) rules that hide content or show a
"rotate your device" overlay. |
Yes — reveals deliberate locks. |
| Check the markup / manifest | Look for the screen.orientation.lock() API or an
orientation field in a web app manifest. |
Yes — programmatic locks. |
| Automated tools (axe, etc.) | Some scanners flag orientation-locking media queries. | Partial — confirm manually; tools miss script-based locks. |
How to fix it
- Remove any orientation lock in the web app manifest or the
screen.orientation.lock()call unless the orientation is essential. - Delete CSS that hides content or shows a "please rotate" message in one orientation.
- Build a responsive, reflowing layout that works in both portrait and landscape at all viewport sizes.
- If you scope styles by orientation, adjust the layout — never remove functionality.
- Re-test by rotating a real device in both directions.
/* Good: reflow per orientation, keep all content usable */
@media (orientation: landscape) {
.gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (orientation: portrait) {
.gallery { grid-template-columns: 1fr; }
}
/* Avoid: hiding content or forcing a single orientation */
Copy-paste tests
Automated coverage
The axe-core rule css-orientation-lock flags failures of this criterion.
Run it via the axe DevTools browser extension or axe-core in CI. Automated tools only
catch some failures — script-based locks and essential-orientation judgements
still need a human.
Run this in the browser console
// Read-only: surface possible orientation locks for review.
const hits = [];
for (const sheet of document.styleSheets) {
let rules;
try { rules = sheet.cssRules; } catch (e) { continue; }
for (const r of rules || []) {
if (r.media && /orientation\s*:/i.test(r.media.mediaText)) {
hits.push({ media: r.media.mediaText, css: r.cssText.slice(0, 120) });
}
}
}
const manifest = document.querySelector('link[rel="manifest"]');
console.log('manifest link:', manifest ? manifest.href : 'none — inspect for "orientation"');
console.table(hits);
What to check manually: rotate a real device between portrait and landscape and confirm all content reflows and stays usable, and decide whether any remaining lock is genuinely essential — no script can judge that.
Related
- All WCAG 2.2 success criteria
- Learn catalog — lessons mapped to criteria.
- Responsive & reflow — layouts that adapt instead of locking (1.3.4, 1.4.10).