Techniques for WCAG 2.0

On this page:

-

# F41: Failure of Success Criterion 2.2.1, 2.2.4, and 3.2.5 due to using meta refresh with a time-out

## Applicability

HTML and XHTML

This failure relates to:

- Success Criterion 2.2.1 (Timing Adjustable)
  - How to Meet 2.2.1 (Timing Adjustable)
  - Understanding Success Criterion 2.2.1 (Timing Adjustable)
- Success Criterion 2.2.4 (Interruptions)
  - How to Meet 2.2.4 (Interruptions)
  - Understanding Success Criterion 2.2.4 (Interruptions)
- Success Criterion 3.2.5 (Change on Request)
  - How to Meet 3.2.5 (Change on Request)
  - Understanding Success Criterion 3.2.5 (Change on Request)

## Description

`meta` `http-equiv` of refresh is often used to periodically refresh pages or to redirect users to another page. If the time interval is too short, people who are blind will not have enough time to make their screen readers read the page before the page refreshes unexpectedly and causes the screen reader to begin reading at the top. Sighted users may also be disoriented by the unexpected refresh.

## Examples

### Failure Example 1

This is a deprecated example that changes the user's page at regular intervals. Content developers should not use this technique to simulate "push" technology. Developers cannot predict how much time a user will require to read a page; premature refresh can disorient users. Content developers should avoid periodic refresh and allow users to choose when they want the latest information. (The number in the `content` attribute is the refresh interval in seconds.)

Example Code:

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>HTML Techniques for WCAG 2.0</title>
        <meta http-equiv="refresh" content="60" />
      </head>
      <body>
        ...
      </body>
    </html>

### Failure Example 2

This is a deprecated example that redirects the user to another page after a number of seconds. Content developers are recommended to user server-side redirects instead. (The number in the `content` attribute is the refresh interval in seconds.)

Example Code:

    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>The Tudors</title>
        <meta http-equiv="refresh" content="10;URL='http://example.com/'" />
      </head>
      <body>
        <p>This page has moved to a <a href="http://example.com/">
        example.com</a>. Please note that we now have our own
        domain name and will redirect you in a few seconds. Please update
        your links and bookmarks.</p>
      </body>
    </html>

## Related Techniques

- SVR1: Implementing automatic redirects on the server side instead of on the client side

## Tests

### Procedure

1. Find `meta` elements in the document.

2. For each `meta` element, check if it contains the attribute `http-equiv` with value "refresh" (case-insensitive) and the `content` attribute with a number (representing seconds) greater than 0.

### Expected Results

- If step 2 is true then this failure condition applies and content fails these Success Criteria.

- Top
- Contents
- Intro
- Previous: Failure F40
- Next: Failure F42