• Success Criterion 2.2.1
  • Conformance level A

One-Time Passcode That Expires Too Quickly to Use

2.2.1 — Timing Adjustable

Scenario

Setting

A pharmacy app's prescription-refill form

What’s wrong

one-time password (OTP)/2FA codes with very short validity and no re-request path within the flow.

Example

const otp = { code: generateCode(), expiresInSeconds: 30 };
// no resend button anywhere in the refill flow

Why it matters

A patient copying a code from a text message often can't finish before the 30-second window closes, blocking the refill.

How to test

Request an OTP/2FA code and time its validity: if it expires very quickly with no easy way to request a new one within the same flow, it fails.

How to fix

Give at least a few minutes and a visible resend option that doesn't reset the form.

const otp = { code: generateCode(), expiresInSeconds: 300 };
// Add a resend control:
// <button onclick="resendCode()">Resend code</button>

Outcome

A patient enters the refill code in time and completes the prescription request on the first try.

Who is affected

Older adults and users with motor or vision impairments need more time to switch apps and enter the code.

Learn more