screen-orientation-lock
Mobile validation
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.
<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.
<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.
class CheckoutViewController: UIViewController {
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
.allButUpsideDown
}
}Cross Platform
Flutter
The app allows both portrait and landscape orientations.
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);Fail Patterns
Android: Android manifest
android:screenOrientation="landscape" locks the activity to landscape.
<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.
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>iOS
UIKit
The view controller supports only the portrait orientation.
class CheckoutViewController: UIViewController {
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
.portrait
}
}Cross Platform
Flutter
The app allows only the portrait orientation.
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]);Try It Yourself
Rotating the device
- Make sure rotation is allowed in the device settings, by turning off the portrait orientation lock.
- Open the app, and go to the screen you want to check.
- 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
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 1.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 549 | 11.1.3.4 Orientation | Same as the WCAG text. |