Orientation
Do not lock the screen to portrait or landscape unless the orientation is essential — a piano keyboard, a cheque scanner. Someone whose wheelchair mount holds their phone sideways cannot simply turn it.
- Principle
- Perceivable
- Guideline
- 1.3
- Level
- AA
- In WCAG since
- 2.1
- Number
- 1.3.4
Broken, then fixed
The same interface twice: first with the mistake, then with the smallest change that fixes it.
The app refuses to work sideways.
A content page with nothing orientation-specific about it, blocking half its readers on a preference.
The same content reflows to whatever shape it is given.
Both orientations work. This is the same discipline as 1.4.10 Reflow — if the layout responds to its container, orientation stops being a special case.
How to test
Check your own interface against 1.3.4, one step at a time.
- Open the page on a phone or tablet with rotation lock off, or use the device toolbar in Chrome or Firefox DevTools, which has a rotate button.
- Load the page in portrait, then rotate to landscape. Check the content turns with the screen and nothing asks you to rotate back.
- Load the page in landscape, then rotate to portrait, and check the same.
- In each orientation, use the page: open the menus, fill in a form field, play a video. Check everything works.
- Search the CSS and scripts for orientation locks, such as screen.orientation.lock() or a media query that hides the content in one orientation, and check each has a reason that is essential.
Common questions
Does a "please rotate your device" message fail 1.3.4?
Yes. W3C lists it as a failure. A person whose tablet is fixed to a wheelchair may not be able to rotate it.
Do I have to design a separate layout for each orientation?
No. 1.3.4 asks only that the content is not locked to one orientation. The layout can change with the screen, as long as it shows and works either way.
When is locking the orientation allowed?
Only when one orientation is essential, such as a piano keyboard app, a banking app that photographs a cheque, or slides made for a projector.
Try it yourself
A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.
Try it: turn the phone
How to use this lab
- Goal. Make the order-tracking page work whichever way up the phone is held.
- The controls. “Hold the phone” turns the phone to Portrait or Landscape. “The page” sets it to Adapts, Locked to portrait or Locked to landscape. The results give the phone’s window size and say whether the content is shown.
- Try this. Choose Locked to portrait, then switch “Hold the phone” to Landscape and watch the page hide everything. Then choose Adapts and turn the phone again.
- What it means. Only Adapts passes 1.3.4. A locked page fails even while it is held the way it allows, because someone whose phone is fixed in the other orientation, for example on a wheelchair mount, can’t turn it and is shut out. The verdict line under the lab says which.
- Portrait: 360 by 640 CSS pixelsThe phone’s window
- Content shownThe page works either way up
1.3.4 passes
Also in guideline 1.3
Criteria in the same guideline often fail together.
- 1.3.1, PerceivableLevel A
Info and Relationships
Fails when: Styling stands in for structure.
- 1.3.2, PerceivableLevel A
Meaningful Sequence
Fails when: The visual order and the document order disagree.
- 1.3.3, PerceivableLevel A
Sensory Characteristics
Fails when: The instruction relies on where things happen to sit.
- 1.3.5, PerceivableLevel AA
Identify Input Purpose
Fails when: Nothing tells the browser what these fields are for.