Level
AA
Since
WCAG 2.1
/ WCAG criterion

1.3.4 Orientation

A page has to work in portrait and in landscape and must not lock itself to one unless the orientation is essential.

/ What it requires

A page must work in portrait and in landscape. It must not lock itself to one of them, turn itself sideways, or cover the screen with a message asking the user to rotate the device. Some people have a phone or tablet mounted in a fixed position, for example on the arm of a power wheelchair, and cannot turn it. Others with low vision choose landscape to get larger text. For both groups a page that only works one way round does not work.

The exception is an orientation that is essential, where the content would not work or make sense otherwise. W3C's examples are photographing a bank cheque, a piano app, slides for a projector or a television, and virtual reality. The criterion is about the author restricting orientation. It does not cover a user who locks their own device, and it does not cover layout changes that come from screen size. Adapting the layout to each orientation is fine; offering only one is not.

/ How pages fail it

  • In landscape a mobile site lays an overlay over the whole page that reads "Please rotate your device".
  • A rule inside @media (orientation: landscape) applies transform: rotate(-90deg) to the body, so in landscape the whole page lies on its side.
  • The web app manifest sets "orientation": "portrait", so the installed app refuses to turn when the device does.
  • A video page calls screen.orientation.lock("landscape") when it enters fullscreen, though the content would work either way.
  • An orientation media query sets display: none on the submit button of a form, so in landscape the form can be filled in and never sent.

/ How to check it yourself

  1. Turn off the system rotation lock on a phone or tablet and open the page in portrait. Note what it shows and what can be done.
  2. Rotate the device to landscape and repeat. The content should stay upright and readable, and every control should still work.
  3. Without a device, open the device toolbar in Chrome developer tools, choose a phone and press the rotate button. That switches the orientation media queries.
  4. Search the CSS for orientation media queries and check what the rules inside them hide, rotate or replace. Search the scripts for screen.orientation.lock and the manifest for an orientation member.
  5. Where one orientation is blocked, decide whether it is essential in the sense of the criterion, like a cheque capture or a piano keyboard, or only a design preference.

/ How to fix it

  • Remove the "rotate your device" overlay and lay the content out for both orientations with responsive CSS.
  • Remove transform: rotate() and the rotate property from rules inside orientation media queries. Use those queries to change layout, such as the number of columns, not to turn content.
  • Delete the orientation member from manifest.json or set it to "any".
  • Remove calls to screen.orientation.lock() unless the orientation is essential. Where it is, offer a control that lets the user switch.
  • Use orientation media queries to rearrange content, never to hide it, so every control stays reachable both ways round.

/ What our scanner checks

No check in our scan covers 1.3.4. The rendered pass loads each page in one fixed desktop viewport and never turns it, so it does not see a rotate-your-device message, a layout rotated by CSS or an orientation lock in the manifest. A manual audit opens the pages on a phone or tablet in both orientations.

/ Who fails it, in our own measurements

The weekly index has no figures for this criterion, because none of the checks the site scan runs can test it. A person judges it, which is what a manual audit is for.

One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.

/ Questions about this criterion

Is it a WCAG failure to lock a mobile site to portrait?

Yes. Success criterion 1.3.4 at level AA does not allow content to restrict its view and operation to one display orientation unless that orientation is essential. Locking by CSS, by script or in the web app manifest, or showing only a message in the other orientation, all count as restricting it. The criterion was added in WCAG 2.1.

What counts as an essential orientation?

One without which the content would not work or would change meaning. W3C names a bank cheque, a piano application, slides for a projector or a television, and virtual reality content. A layout that the designer thinks looks better in portrait is not essential; an app that photographs a document twice as wide as it is high may be.

If a user locks their phone to portrait, does the site fail?

No. The criterion is about content that restricts orientation, not about the user's own setting. W3C notes that a page which does not restrict orientation follows the device lock automatically. Detecting the orientation and adjusting the layout to it is also allowed. The failure is offering only one orientation.