Skip to content

Test your website now

Free, no card. We read only public pages.

Run free audit →

Accessibility · WCAG 1.3.4 level AA

CSS Media Queries Must Not Lock Display Orientation

Remove unintended orientation restrictions. Keep tasks usable in portrait and landscape, inspect overlays and scripts, and separate scan coverage from WCAG.

Published · Updated

What the check tests

Check
a11y.axe.css-orientation-lock - CSS Media queries must not lock display orientation
Passes when
Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations
Scope
graded on every page crawled
Conformance
WCAG level AA
Fix effort
small - under an hour

In one paragraph

CSS media queries must not lock display orientation addresses author-imposed restrictions that make content usable only in portrait or landscape without an essential reason. Ordinary orientation-based layout adjustments are not automatically a problem. Test the real task in both orientations, including overlays and scripts. The supplied WebAuditOS configuration does not execute this experimental rule, so a missing finding provides no orientation assurance.

Why it matters

WCAG 1.3.4 requires content not to restrict its view and operation to one display orientation unless that orientation is essential. Users may have a device mounted or may prefer an orientation for magnification or other reasons. Requiring physical rotation can prevent access entirely.

Essential is a specific exception, not a synonym for easier design or a preferred marketing composition. W3C gives examples such as particular physical capture tasks or specialised applications, while the actual situation still needs evaluation.

Different layouts can be appropriate. A two-column landscape view and a single-column portrait view do not have to look identical to satisfy the goal. Other issues caused by viewport dimensions or reflow have their own requirements, so keep that analysis distinct.

How WebAuditOS evaluates this finding

The supplied css-orientation-lock description looks for selected orientation-media-query transformations around ninety-degree rotations. That candidate detector does not cover every rotate-device overlay, Screen Orientation API use, or conditionally unavailable task.

The source states this experimental rule is not selected in the current WCAG-tag run. It therefore produces no finding in the documented report. Even if enabled later, a transform match would need context review rather than proving every rotated element locks the page.

How to fix it

  1. Open each important task in portrait and landscape on supported devices or suitable test environments. Include login, checkout, forms, media, and dialogs rather than reviewing only a homepage screenshot.
  2. Identify author restrictions separately from the user's device settings. A user-selected system orientation lock is not the same as a website demanding a different orientation.
  3. Search for forced rotation transforms, blocking please-rotate overlays, hidden main content, script calls, and orientation-dependent controls. A static stylesheet search cannot expose every route or runtime decision.
  4. Remove restrictions that exist only to conceal an inflexible layout. Use responsive sizing and rearrangement so the same essential task remains available. An orientation query can legitimately adapt presentation, for example changing a card grid, without blocking use.
  5. If orientation appears essential, document the actual information or functionality that would fundamentally change and whether a conforming alternative is feasible. Do not assume an entire application inherits an exception from one specialised step.
  6. Test focus, reading order, retained form values, and modal placement when rotating or resizing. A layout that technically appears in both orientations can still lose data or hide the action needed to finish.
  7. Review zoom and reflow independently. Supporting two orientations does not validate text enlargement, target sizes, overflow, or every responsive state.
  8. Record manual results and retest after significant component or layout changes. Rescan other relevant rules, but do not use this disabled rule's silence as evidence of WCAG conformance.

What the fix can break

Removing a transform can expose fixed dimensions, overflow, or poorly positioned controls. Fix those underlying layouts rather than restoring the lock.

Rotation events can trigger unnecessary rerenders and discard input or playback state. Preserve meaningful user work while adapting presentation.

Do not delete informative guidance entirely when a genuine physical task needs it. Communicate the actual requirement and available alternative without making unrelated content inaccessible.

Questions

Are all orientation media queries forbidden?

No. Adapting layout is different from restricting the user's view or operation to a single orientation.

Is a please-rotate overlay always harmless guidance?

Not when it blocks content or operation without an applicable essential reason. Review actual behaviour.

Does the scan currently test this restriction?

The supplied configuration says this experimental rule is not run. Manual testing is required.

Review zoom restrictions, viewport settings, and the mobile usability guide.

What severity does this get in the report?

None today, because the rule is not run. If it were, an axe finding takes its severity from the impact axe reports, mapped critical and serious to high, moderate to medium, minor to low, and this rule is declared serious, so it would arrive as high. That is why the panel above states a conformance level rather than a severity.

Standards and sources

In the report

Test this on your own site

Every scan runs a11y.axe.css-orientation-lock on every page it crawls, on every plan. The finding carries this id, so a line in a report can be matched to the explanation above - and the free scan needs no account.