Perceivable · 1.3 Adaptable

Orientation WCAG 1.3.4 · Level AA

Content must not restrict its display and operation to a single orientation, portrait or landscape, unless that orientation is essential, such as for a bank check, a piano app or slides for a projector.

Level
AA
Since
WCAG 2.1
Principle
Perceivable
Guideline
1.3 Adaptable

Live demo

Turn the screen to portrait

The same task, done two ways: switch between the version that passes and the one that fails, or put them side by side. Everything in the box is live, so try it with a keyboard, a pointer or a screen reader.

Switch the frame to portrait in each version. The failing version hides the account until you turn it back.

Live example

Passes

Your account

Balance

$2,340.18

Recent payments
  • City Rail, $32.00
  • Corner Grocer, $58.75
  • Coffee House, $4.20

What happened

    Why it passes

    In portrait the two panels stack into one column, so you can check your balance and payments whichever way you hold the device.

    Why it fails

    In portrait a message covers the account and asks you to rotate. Someone whose tablet is mounted on a wheelchair cannot turn it, so they cannot use the account at all.

    Examples

    Code that fails, and the fix

    Four examples, each one running: the usual ways this criterion fails, and code that passes. Listen to them, measure them, or copy the code.

    01What changes 3 lines

    Fails

    Rotate message blocks portrait

    Live preview

    CSS
    .rotate-message { display: none; }@media (orientation: portrait) {  .app { display: none; }  .rotate-message { display: block; }}

    In portrait the app is replaced by a "Please rotate your device" message, so it only works in landscape although nothing about it needs landscape.

    Passes

    Layout adapts to portrait

    Live preview

    CSS
    .app { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }@media (orientation: portrait) {  .app { grid-template-columns: 1fr; }}

    Portrait gets a one-column layout instead of a block, so the content works whichever way the device is held.

    02What changes 3 lines

    Fails

    Script locks checkout to portrait

    Live preview

    JavaScript
    // Checkout forces portrait for no essential reasonasync function openCheckout() {  await document.documentElement.requestFullscreen();  await screen.orientation.lock("portrait");}

    A checkout form does not need one orientation, so locking it shuts out people whose device is fixed in landscape, such as a tablet mounted on a wheelchair.

    Passes

    Essential orientation for a piano app

    Live preview

    JavaScript
    // A full piano keyboard needs the width of landscapeasync function openPiano() {  await document.documentElement.requestFullscreen();  await screen.orientation.lock("landscape");}

    A piano app is one of the cases where a specific orientation can be essential, so the exception in 1.3.4 allows the lock here.

    Why it matters

    Who it helps

    People whose device is mounted in a fixed orientation, such as on a wheelchair, or who cannot easily rotate it, can use content in the orientation they have.

    W3C: Understanding 1.3.4
    • Level AA

      Level AA is the level most laws and policies require.

    • In WCAG versions

      Added in WCAG 2.1 in June 2018, and kept in 2.2.

      No WCAG 1.0 checkpoint maps to it.

    • Where it is required

      Required where the law names WCAG 2.1 or later at this level: the United States, Canada, the European Union, the United Kingdom, France, Germany, Italy, Spain, the Netherlands, Ireland, Norway, Switzerland, India, Australia and New Zealand.

    How to test

    Checking it

    A few concrete steps. Automated tools find some failures; most need a person.

    1. Open the page on a phone or tablet, or in an emulator, in both portrait and landscape.
    2. Confirm content displays and works in both orientations without a message asking you to rotate the device.

    Common failures

    Where it breaks

    • A 'please rotate your device' overlay blocks the site in portrait or in landscape.
    • Scripts or CSS transforms lock the page to landscape even when the device is held in portrait.

    On the Accessibility Checklist