# Orientation: Support Portrait and Landscape

Source: https://allyway.ai/glossary/orientation

Orientation is WCAG success criterion 1.3.4: content must not restrict its view and operation to a single display orientation, such as portrait or landscape, unless a specific orientation is essential.

Orientation in WCAG means that a website works in both portrait and landscape mode. When a page locks itself to one screen orientation – or hides its content behind a "Please rotate your device" message – people who cannot turn their phone or tablet are shut out. The fix is usually simple: let the layout adapt instead of forcing a direction.

## What it means

[WCAG 1.3.4 Orientation](https://www.w3.org/WAI/WCAG22/Understanding/orientation.html) is a Level AA criterion, added in WCAG 2.1 and part of [WCAG 2.2](https://allyway.ai/regulations/wcag-2-2). Content must not restrict its view and operation to a single display orientation unless a specific orientation is essential. "Essential" means that without it the information or functionality would fundamentally change and cannot be achieved in another conforming way.

| Situation | Allowed to lock orientation? |
|---|---|
| Online shop, blog, news site, web app | No – must work in portrait and landscape |
| Video player, messaging, e-reader | No – W3C's examples show both orientations |
| Banking app capturing a check image in landscape | Yes – a check is about twice as wide as it is tall |
| Piano app keeping keys usable in landscape | Yes – the keys need their proportions |
| Content for a television or VR goggles | Yes – the display has only one orientation |

Who benefits: people whose device is mounted in a fixed position, for example on a power wheelchair, cannot rotate it. People with motor impairments may find it hard to turn a device. People with low vision may prefer landscape because it gives larger text. W3C also notes that layout changes based on screen size are outside this criterion – only restricting the orientation counts.

> **Tip:** > **Responsive design solves most cases**
> A layout that adapts to the available width usually passes automatically. Combine it with [reflow](https://allyway.ai/glossary/reflow) and [resize text](https://allyway.ai/glossary/resize-text): content that works at 320 CSS pixels wide and at 200 % text size rarely breaks in landscape.

## Examples

```html title="Example"
<!-- Fails (F100): content hidden in portrait, only a message is shown -->
<style>
  @media (orientation: portrait) {
    main { display: none; }
    .rotate-hint { display: block; }
  }
</style>

<!-- Passes: the layout adapts, nothing is hidden -->
<style>
  .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  @media (orientation: landscape) {
    .gallery { gap: 2rem; }
  }
</style>
```

Using `@media (orientation: …)` is fine for adjusting a layout. It becomes a failure only when it is used to block content or functions. The same applies to scripts that lock the orientation with the Screen Orientation API – W3C lists locking the view as failure F97.

**Do:** Do

Let every page work in portrait and landscape, use orientation media queries only to fine-tune the layout, keep controls large enough in both modes, and lock the orientation only when it is really essential.

**Don't:** Don't

Show a "rotate your device" screen instead of the content, hide the menu or checkout in one orientation, lock a whole web app to portrait, or call an orientation "essential" when it is just the preferred design.

## How to check orientation



## Questions

Q: Does my website have to work in landscape mode?
A: Yes, unless a specific orientation is essential to the content. Under WCAG 1.3.4 a website must not restrict its view and operation to portrait or landscape. Most websites have no essential reason, so they must support both.

Q: Is a "please rotate your device" message allowed?
A: Not if it replaces the content. W3C lists showing a message that asks users to reorient their device as failure F100. A short hint is fine as long as the page still works in the current orientation.

Q: Can I use CSS orientation media queries?
A: Yes. Changing the layout for portrait or landscape is allowed and often helpful. Only using them to hide content or block functions fails the criterion.

Q: Which laws require screen orientation support?
A: WCAG 1.3.4 is Level AA, the level referenced by [EN 301 549](https://allyway.ai/regulations/en-301-549) and therefore by the [European Accessibility Act](https://allyway.ai/regulations/eaa) in the EU.

Q: How do I test orientation without a phone?
A: Use your browser's DevTools device mode and switch between portrait and landscape. Real devices are still worth a final check. For code-level problems on many pages, the [free WCAG scanner](https://allyway.ai/free-wcag-accessibility-scanner-for-websites) gives a quick overview.
