- Level
- A
- Since
- WCAG 2.0
- Entries
- 1 / 193
2.2.1 Timing Adjustable
When the page sets a time limit, the user must be able to turn it off, adjust it or extend it, unless the limit belongs to a real-time event, is essential or is longer than 20 hours.
/ What it requires
Anything that happens after a set time without the user starting it is a time limit: a session that logs out after a period of inactivity, a checkout that releases the basket, a quiz with a countdown, a page that reloads or redirects itself, a message that disappears before it can be read. People who are blind and explore the page with a screen reader, people with low vision, with limited dexterity or with cognitive or language disabilities can need several times longer than the designer assumed. When the clock runs out they lose their work or the content they were reading.
For each time limit set by the content, one option must hold. The user can turn it off before meeting it; or adjust it before meeting it over a range of at least ten times the default; or is warned before it expires, given at least 20 seconds to extend it with a simple action, and allowed to extend it at least ten times. Three exceptions remain: a real-time event such as an auction where no alternative is possible, a limit that is essential because extending it would invalidate the activity, and a limit longer than 20 hours. A timer is not a limit when the same information is available another way, and moving content such as a carousel is handled by 2.2.2.
/ How pages fail it
- A news page reloads itself every few minutes through a meta refresh, sending the reader back to the top.
- A thank-you page sends the visitor to the homepage after ten seconds with meta http-equiv="refresh" content="10; url=/".
- A signed-in session ends after a period of inactivity with no warning, and the form the user was filling in is lost.
- A warning appears before the session expires but offers only a Log out button, or closes itself after a few seconds.
- A practice quiz runs a countdown that cannot be paused, extended or switched off, although nothing about the activity depends on the timing.
/ How to check it yourself
- List every time limit on the site: session expiry, inactivity logout, countdowns, holds in a checkout, automatic reloads, timed redirects and messages that disappear by themselves.
- View the page source and search for http-equiv="refresh". A delay above zero, with or without a URL, is a limit the user cannot control unless it is longer than 20 hours.
- Leave a signed-in page idle and time how long it takes before a warning or a logout appears. A warning must give at least 20 seconds and extend the session with one simple action, and that must work ten times.
- Look for a setting before a timed task that turns the limit off or raises it to at least ten times the default.
- Repeat the warning test with the keyboard only and with a screen reader, to confirm that the warning is announced and its extend button can be reached in time.
/ How to fix it
- Remove meta refresh. Redirect with an HTTP 301 or 302 response instead of a timed page, and let users reload changing content with a button.
- Before a session ends, open a dialog that says how much time is left and has an Extend session button, wait at least 20 seconds for an answer, and renew the server-side session when the button is pressed.
- At the start of a timed task, offer a setting that switches the limit off or multiplies it by ten.
- Keep toasts and status messages on screen until the user dismisses them, or make the same information available elsewhere, such as in a notifications list.
- Save form input as the user types, in sessionStorage or on the server, so that an expired session does not throw the work away.
/ What our scanner checks
HTML_CodeSniffer runs on the rendered page and reports a meta element with http-equiv="refresh" whose content begins with a digit from 1 to 9: technique F40 when the content also holds url=, F41 when the page reloads itself. A delay of 0 passes. It flags a delay beyond the 20 hour exception too, and it cannot see timers set in script, session expiry or redirects sent by the server.
/ Who fails it, in our own measurements
| Body | Sector | Instances | Score |
|---|---|---|---|
| Detroit | city · US | 1 | 40 |
One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.
/ Questions about this criterion
How much time must a session timeout warning give?
At least 20 seconds to respond with a simple action, such as pressing a button or the space bar, and the user must be able to extend the limit at least ten times. The other two ways to pass are letting the user turn the limit off, or set it to at least ten times the default, before meeting it.
Are session timeouts for security exempt from 2.2.1?
Not automatically. W3C treats a limit added for security as set by the content, so it has to meet the criterion, usually through a warning with an option to extend. Some security limits can count as essential, such as a time-based one-time code. Limits set outside the content, by the browser or the network, are not the author's responsibility, but limits set by the site's own servers are.
Does a meta refresh fail WCAG 2.2.1?
Yes, when it has a delay. W3C failure techniques F40 and F41 cover a timed redirect and a timed reload made with meta refresh. A delay of zero redirects at once and sets no time limit. Neither does a server redirect with a 3xx status, which is the cleaner way to move a visitor to another address.
