Technique F40:Failure due to using meta redirect with a time limit
About this Technique
This technique relates to:
- 2.2.1: Timing Adjustable (Failure)
- 2.2.4: Interruptions (Failure)
- 3.2.5: Change on Request (Failure)
This failure applies to all pages.
Description
meta http-equiv content="{time} url=..."
is often used to
automatically redirect users. When this occurs after a time delay, it is an
unexpected change of context that may interrupt the user.
It is acceptable to use the meta element to create a redirect when the time-out is set to zero, since the redirect is instant and will not be perceived as a change of context. However, it is preferable to use server-side methods to accomplish this. See Implementing automatic redirects on the server side instead of on the client side.
Examples
Example 1
The page below is a failure because it will redirect to the URI https://www.example.com/newpage after a time limit of 5 seconds.
<!doctype>
<html lang="en">
<head>
<title>Do not use this!</title>
<meta http-equiv="refresh" content="5; url=https://www.example.com/newpage">
</head>
<body>
<p>
If your browser supports Refresh, you'll be transported to our
<a href="https://www.example.com/newpage">new site</a> in 5 seconds,
otherwise select the link manually.
</p>
</body>
</html>
Related Resources
No endorsement implied.
Tests
Procedure
For a page that uses meta http-equiv="refresh"
:
- Check that the numerical value for seconds until refresh in the
content attribute is present. - Check that the numerical value for seconds until refresh in the
content attribute is less than one or greater than 72,000. - Check if the page qualifies for Real-time or Essential Exceptions in Success Criterion 2.2.1 Timing Adjustable.
- Check if the user is provided an opportunity to turn off, extend, or adjust the timing of the page refresh.
- Check if the page does not redirect after the duration specified in the
content attribute.
Expected Results
- If checks #1-5 are false, this failure condition applies and the content fails Success Criterion 2.2.1.
- If checks #1, #2, #4, and #5 are false, this failure condition applies and the content fails Success Criterion 2.2.4.
- If checks #1, #4, and #5 are false, this failure condition applies and the content fails Success Criterion 3.2.5.