• Success Criterion 1.3.4
  • Conformance level AA

Screen Orientation Locked in Code With No Essential Justification

1.3.4 — Orientation

Scenario

Setting

A community forum's discussion thread

What’s wrong

screen.orientation.lock() in web app without essential justification.

Example

window.addEventListener('load', () => {
  if (screen.orientation && screen.orientation.lock) {
    screen.orientation.lock('portrait').catch(() => {});
  }
});

Why it matters

A forum reader with their phone mounted in a landscape car dock, or lying flat on a landscape stand, finds the thread locked to portrait for no functional reason.

How to test

Check the JS console/source for screen.orientation.lock() calls: if present without a genuine essential-use justification (e.g., a game requiring landscape), it fails.

How to fix

Remove the orientation lock call entirely since a discussion thread has no essential need for a single orientation, and only lock orientation when a specific feature genuinely requires it, such as a piano keyboard or a bubble level, never as a default.

Outcome

A forum reader with a landscape-mounted phone now reads the thread in whichever orientation suits them.

Who is affected

Users with devices fixed in a stand or mount, and anyone who prefers reading long threads in landscape, are blocked without justification.

Learn more