auditmysitev2.0.2

Page reloads or redirects itself after a delay (AAA)

timing/meta-refresh-enhanced

WCAG success criterion
2.2.4 (level AAA)
Outcome class
Automatic. An automated check that can report a confirmed violation.
Area
Accessibility, Navigation & Operation
Default severity
medium
axe-core rule
timing/meta-refresh-enhanced

Why we flag this

Users are interrupted: the page changes without a request, and screen reader users lose their reading position.

A <meta http-equiv="refresh"> with a delay above 0 reloads or redirects the page after that delay, also above 20 hours.

What the rule checks

Scope. The first meta element with http-equiv=refresh (any case) whose content starts with digits, also when inserted by script.

Expectation. Fails at the meta element when it reloads or redirects after any delay above 0, also 20 hours or more: the 20-hour exception of 2.2.1 does not apply at AAA, and a change the user did not request interrupts them. Content without leading digits is ignored by browsers and passes. A delay of 0 is an immediate redirect, not an interruption; it is not exercised in the corpus because it would navigate the fixture away. Only the first valid refresh counts, as in the browser.

Source. WCAG 2.2 SC 2.2.4 Interruptions and SC 3.2.5 Change on Request (AAA); technique H76/F40/F41; HTML 'shared declarative refresh steps'; ACT bisz58

Detection: shared; needs dom.

Failing example

The check reports a violation here. Corpus case visual_meta_refresh_exempt, element meta#daily-refresh. The page may contain further findings for other rules.

visual_meta_refresh_exempt.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 72001 s, just over 20 hours: the 20-hour exception of 2.2.1 ("longer than 20 hours"). -->
<meta id="daily-refresh" http-equiv="refresh" content="72001">
<!-- No leading digits: the browser ignores this declaration. -->
<meta id="broken-refresh" http-equiv="refresh" content="soon; url=/news">
<title>Dashboard refreshed once a day</title>
</head>
<body>
<header>
  <a href="#main" style="display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; padding: 0 8px">Skip to main content</a>
  <p>Status board</p>
  <nav aria-label="Main"><a href="#main" aria-current="page" style="display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; padding: 0 8px">Overview</a></nav>
</header>
<main id="main">
  <h1>Service status</h1>
  <p>All systems operational.</p>
</main>
<footer><p>Footer text</p></footer>
</body>
</html>

Passing example

The check passes here and reports nothing. Corpus case visual_meta_refresh_exempt, element meta#broken-refresh. The page may contain further findings for other rules.

visual_meta_refresh_exempt.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 72001 s, just over 20 hours: the 20-hour exception of 2.2.1 ("longer than 20 hours"). -->
<meta id="daily-refresh" http-equiv="refresh" content="72001">
<!-- No leading digits: the browser ignores this declaration. -->
<meta id="broken-refresh" http-equiv="refresh" content="soon; url=/news">
<title>Dashboard refreshed once a day</title>
</head>
<body>
<header>
  <a href="#main" style="display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; padding: 0 8px">Skip to main content</a>
  <p>Status board</p>
  <nav aria-label="Main"><a href="#main" aria-current="page" style="display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; padding: 0 8px">Overview</a></nav>
</header>
<main id="main">
  <h1>Service status</h1>
  <p>All systems operational.</p>
</main>
<footer><p>Footer text</p></footer>
</body>
</html>

This page is generated from the rule catalogue and the rule contracts; see therule overview for how the outcome classes are derived.