We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

screen-orientation-lock

Mobile validation

Don't lock the app to one screen orientation. Support both portrait and landscape, unless a specific orientation is essential.

Some assistive technologies, device mounts, and input methods work in only one orientation. For example, a phone mounted on a wheelchair may be fixed in landscape. If an app forces a different orientation, these users may be unable to perceive its content or operate its controls. Support both portrait and landscape orientations. Restrict the orientation only when a specific orientation is essential to the content, such as a piano app or a bank check deposit screen.

Note: This validation covers screens that are locked to one orientation. When a screen rotates but loses or blocks content, see the related screen-orientation-consistency validation.

Pass Patterns

Android: Android manifest

The activity does not set android:screenOrientation, so it follows the device's orientation. This applies to both XML Views and Jetpack Compose apps.

XML
<activity android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

iOS: Info.plist

The project lists both portrait and landscape orientations. This applies to both UIKit and SwiftUI apps.

XML
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>

iOS

UIKit

The view controller supports every orientation except upside down.

Swift
class CheckoutViewController: UIViewController {
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        .allButUpsideDown
    }
}

Cross Platform

Flutter

The app allows both portrait and landscape orientations.

Dart
SystemChrome.setPreferredOrientations([
  DeviceOrientation.portraitUp,
  DeviceOrientation.landscapeLeft,
  DeviceOrientation.landscapeRight,
]);

Fail Patterns

Android: Android manifest

android:screenOrientation="landscape" locks the activity to landscape.

XML
<activity
    android:name=".MainActivity"
    android:screenOrientation="landscape">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

iOS: Info.plist

The project lists only the portrait orientation, so the app is locked to portrait.

XML
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>

iOS

UIKit

The view controller supports only the portrait orientation.

Swift
class CheckoutViewController: UIViewController {
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        .portrait
    }
}

Cross Platform

Flutter

The app allows only the portrait orientation.

Dart
SystemChrome.setPreferredOrientations([
  DeviceOrientation.portraitUp,
]);

Try It Yourself

Rotating the device

  1. Make sure rotation is allowed in the device settings, by turning off the portrait orientation lock.
  2. Open the app, and go to the screen you want to check.
  3. Rotate the device from portrait to landscape, and then back to portrait.

Expected results: The screen rotates to match the device's orientation.

Actual results: The screen stays in the same orientation when the device is rotated.

FAQ

How does this issue relate to 1.3.4 Orientation?

SC 1.3.4 requires that content is not restricted to a single display orientation, such as portrait or landscape, unless a specific orientation is essential. Locking a screen to one orientation, without such a need, does not meet the criterion.

Why is this issue marked as Serious?

When a device is fixed in one position, for example by a mount, and the app forces the other orientation, the app may become hard or impossible to use. Content can be sideways, truncated, or out of reach, which blocks core tasks, so it is rated serious.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.21.3.4 Orientation (AA)Content does not restrict its view and operation to a single display orientation, such as portrait or landscape, unless a specific orientation is essential.
EN 301 54911.1.3.4 OrientationSame as the WCAG text.

Personas impacted by this issue

Learn More