Time limits
A session that ends without warning throws away work, and some people need far longer than others.
The answer
Avoid time limits. Where one is needed, warn before it ends and let people extend it. As strong as the weakest rule behind it: moderate.
-
For any time limit, let people turn it off, extend it to at least ten times the default, or get a warning and extend it with one simple action, at least ten times.
WCAG 2.2 success criterion 2.2.1 Timing Adjustable, level A. The warning must give at least 20 seconds to respond.
- Applies when
- Any time limit set by the content, except real-time events, essential limits and limits over 20 hours.
- Based on
- Standard or law
- Principle
- Keep people in control
- StandardStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
-
Set a time limit only when security or resources require it.
A government pattern says so, and WCAG ranks turning the limit off as most helpful. Log data from two universities showed short sessions cost users the most time (see Log in).
- Applies when
- Deciding whether to time out.
- Based on
- Practitioner research
- Principle
- Keep people in control
- Field dataField data: Empirical Measurement of Systemic 2FA UsabilityReynolds, 2020
- StandardStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- GuidanceGuidance: Manage a session timeoutUK Department for Work and Pensions design system, 2025
-
Warn at least two minutes before a session ends, in a dialog that offers more time, with a countdown announced politely.
Two UK government patterns agree on two minutes. One reports testing with 8 assistive technology users: a dialog alerted them faster than a warning page, and minutes then 20-second steps worked best. WCAG's floor is 20 seconds; the two minutes is practice.
- Applies when
- A session timeout is needed.
- Based on
- Practitioner research
- Principle
- Keep people informed
- Common mistake
- A session that ends silently and discards a half-filled form.
- Common mistake
- A warning with ten seconds to respond.
- Common mistake
- A countdown that announces every second to a screen reader.
- StandardStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- GuidanceGuidance: Help users to manage a service timing outUK Home Office design system
- Guidance: Manage a session timeoutUK Department for Work and Pensions design system, 2025
The other rules
-
When a session ends, keep what people entered, and say whether it was kept.
The government pattern reports users hoped their input would survive. WCAG 2.2.6 (tell people how long before data is lost) and 2.2.5 (keep data on re-authenticating) are AAA and set no floor. See Saving and resuming.
- Applies when
- A session has expired.
- Based on
- Practitioner research
- Principle
- Help people recover from errors
- StandardsStandard: Understanding SC 2.2.6 Timeouts (Level AAA)W3C WAI
- Standard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- GuidanceGuidance: Help users to manage a service timing outUK Home Office design system
-
Don’t warn about inactivity too early. People take it as a limit on the whole task.
One government pattern's research summary, no numbers.
- Applies when
- Timing the warning.
- Based on
- Practitioner research
- Principle
- Speak the person’s language
- GuidanceGuidance: Help users to manage a service timing outUK Home Office design system
-
After a timeout, say what happened and how to continue.
One government pattern.
- Applies when
- The person returns to an expired session.
- Based on
- Practitioner research
- Principle
- Keep people informed
- GuidanceGuidance: Manage a session timeoutUK Department for Work and Pensions design system, 2025
Accessibility
- WCAG 2.2 · 2.2.1WCAG 2.2.1 (A). WCAG 2.2.5 and 2.2.6 are AAA.
- The warning is a dialog and follows Modal dialogs and Focus management on open and close.
Open questions
- OpenHow much extra time do people with disabilities need? WCAG says its ten-times and 20-second figures come from clinical experience; no study found.
- OpenPeople in one service dismissed timeout warnings unread; whether wording changes that is untested.
- OpenA W3C cognitive accessibility pattern on timeouts was opened by the reader and not recorded.
Sources
- Field dataField data: Empirical Measurement of Systemic 2FA UsabilityReynolds, 2020
- StandardsStandard: Understanding SC 2.2.1 Timing Adjustable (Level A)W3C WAI
- Standard: Understanding SC 2.2.6 Timeouts (Level AAA)W3C WAI
- GuidanceGuidance: Manage a session timeoutUK Department for Work and Pensions design system, 2025
- Guidance: Help users to manage a service timing outUK Home Office design system
Related
- Saving and resumingWhen a form needs things people may have to go and find, let them save and come back.Answer: moderate.
- Preserving input after an errorNever make people type something twice. Keep what they entered through errors and back steps.Answer: weak.
- Toasts and notificationsUse messages that vanish by themselves only for things people can afford to miss.Answer: moderate.
- Log inNever block paste or password managers, and slow repeated attempts instead of locking people out.Answer: weak.
- Modal dialogsUse a modal only when people must respond before anything else, and only after their own action.Answer: moderate.