Operable · 2.2 Enough Time

Interruptions WCAG 2.2.4 · Level AAA

Users must be able to postpone or suppress interruptions, such as alerts, pop-ups and automatic content updates initiated by the content or server. Interruptions involving an emergency are exempt.

Level
AAA
Since
WCAG 2.0
Principle
Operable
Guideline
2.2 Enough Time

Live demo

Fill in a form while updates arrive

The same task, done two ways: switch between the version that passes and the one that fails, or put them side by side. Everything in the box is live, so try it with a keyboard, a pointer or a screen reader.

Start filling in the form while travel updates keep arriving. In Passes you can hold the updates until you are ready to read them.

Live example

Passes

Change your train booking

Enter your booking reference and the date you want to travel instead.

Live travel updates

What happened

    Why it passes

    You can put the updates on hold while you work and read them all when you choose, so nothing breaks your concentration.

    Why it fails

    A new update pushes in every few seconds and nothing holds them back, so you keep losing your place in the form.

    Examples

    Code that fails, and the fix

    Four examples, each one running: the usual ways this criterion fails, and code that passes. Listen to them, measure them, or copy the code.

    01

    Fails

    Page that reloads itself every minute

    Live preview

    JavaScript
    // Reloads the news page every 60 secondssetInterval(() => {  location.reload();}, 60000);

    Every minute the page reloads: the reader loses their place and a screen reader starts again from the top. There is no way to postpone or stop it.

    Passes

    New stories wait until asked for

    Live preview

    JavaScript
    const source = new EventSource("/live/stories");let waiting = [];source.addEventListener("message", (event) => {  waiting.push(JSON.parse(event.data));  showNewButton.textContent = "Show " + waiting.length + " new stories";  showNewButton.hidden = false;});showNewButton.addEventListener("click", () => {  waiting.forEach(addStoryToList);  waiting = [];  showNewButton.hidden = true;});

    New stories are held until the reader asks for them, so the page never changes under them (technique G76).

    Fails

    Chat invitation that grabs focus

    Live preview

    JavaScript
    setTimeout(() => {  chatInvite.hidden = false;  chatInvite.querySelector("button").focus();}, 30000);

    Thirty seconds in, a chat invitation appears and takes focus in the middle of a task. There is no setting to stop or delay it.

    Passes

    Settings to turn interruptions off

    Live preview

    HTML
    <fieldset>  <legend>While I shop</legend>  <input type="checkbox" id="chat-invites" name="chat-invites">  <label for="chat-invites">Offer me live chat</label>  <input type="checkbox" id="price-alerts" name="price-alerts" checked>  <label for="price-alerts">Show price drop alerts</label></fieldset>

    Each kind of interruption can be turned off, and chat invitations start off. Only emergency messages, which the criterion exempts, would still appear.

    Why it matters

    Who it helps

    People with attention deficits, cognitive disabilities or low vision, and screen reader users, lose their place and their train of thought when content interrupts them unexpectedly.

    W3C: Understanding 2.2.4
    • Level AAA

      Level AAA is the highest level. It is not required for whole sites, but it is worth meeting where you can.

    • In WCAG versions

      Part of WCAG 2.0 since December 2008, and of every version after it.

      WCAG 1.0 checkpoints: 7.4

    • Where it is required

      No law on this site requires Level AAA criteria for whole sites.

    How to test

    Checking it

    A few concrete steps. Automated tools find some failures; most need a person.

    1. Use the site for a while and note any pop-ups, chat invitations, notifications, alerts or automatic content updates it initiates.
    2. Confirm there is a setting or control to postpone or turn off each non-emergency interruption, such as a preference to disable automatic updates.

    Common failures

    Where it breaks

    • A chat or survey pop-up appears on a timer and there is no setting to stop such prompts.
    • A news page refreshes itself automatically with no setting to postpone or stop the updates.
    • Promotional notifications keep appearing during a task and cannot be paused or suppressed.