EA-R79
<meta> element has refresh delay
This rule is an error and tests the following accessibility guidelines:
This is an error that should be corrected manually.
Description
This rule checks that the meta
element is not used for delayed redirecting or refreshing.
Explanation
This rule checks that the <meta> element is not used for delayed redirecting or refreshing. If a refresh or redirect is used, then the value of the <meta> element's content attribute has to be either 0 or greater than 72000 (20 hours).
Applicability
This rule applies to the first meta
element in a document for which all the following are true:
- the element has an
http-equiv
attribute value of"refresh"
; and - the element has a valid
content
attribute value, as described in the meta refresh pragma directive.
Expectation
For each test target, running the shared declarative refresh steps, given the target's document, the value of the target's content
attribute, and the target results in time being either 0 or greater than 72000 (20 hours).
Assumptions
- This rule assumes no functionality was provided by the website for the user to adjust the timer.
- This rule assumes that the refresh was not essential, which is listed as a valid exception to SC 2.2.1.
Accessibility Support
Not all major web browsers parse the value of the content
attribute in the same way. Some major browsers, when they are unable to parse the value, default to a 0 seconds delay, whereas others will not redirect at all. This can cause some pages to be inapplicable for this rule, while still having a redirect in a minority of web browsers.
Background
This rule is designed specifically for 2.2.1 Timing Adjustable, which can be satisfied if the time limit is over 20 hours long. All pages that fail this because of a "refresh" meta
element also do not satisfy 2.2.3 No Timing and 3.2.5 Change on Request. In order to adequately test the expectation, some of the passed examples do not satisfy 2.2.3 No Timing and 3.2.5 Change on Request.
Bibliography
- Understanding Success Criterion 2.2.1: Timing Adjustable
- Understanding Success Criterion 2.2.4: Interruptions
- Understanding Success Criterion 3.2.5: Change on Request
- G110: Using an instant client-side redirect
- H76: Using meta refresh to create an instant client-side redirect
- F40: Failure of Success Criterion 2.2.1 and 2.2.4 due to using meta redirect with a time limit
- F41: Failure of Success Criterion 2.2.1, 2.2.4, and 3.2.5 due to using meta refresh with a time-out
Tip
Don't use delayed refreshes or redirect or provide a functionality for the user to adjust the timer.
Examples
Passed
Example 1 - Passed
Redirects immediately.
<head>
<meta http-equiv="refresh" content="0; URL='https://github.com'" />
</head>
Example 2 - Passed
First valid <meta http-equiv="refresh">
redirects immediately.
<head>
<meta http-equiv="refresh" content="0; https://w3.org" />
<meta http-equiv="refresh" content="5; https://w3.org" />
</head>
Example 3 - Passed
Redirects after more than 20 hours.
<head>
<meta http-equiv="refresh" content="72001; https://w3.org" />
</head>
Failed
Example 1 - Failed
Refreshes after 30 seconds.
<head>
<meta http-equiv="refresh" content="30" />
</head>
Example 2 - Failed
Redirects after 30 seconds.
<head>
<meta http-equiv="refresh" content="30; URL='https://w3.org'" />
</head>
Example 3 - Failed
First <meta http-equiv="refresh">
element is not valid, second one redirects after 5 seconds.
<head>
<meta http-equiv="refresh" content="0: https://w3.org" />
<meta http-equiv="refresh" content="5; https://w3.org" />
</head>
Example 4 - Failed
Redirects after exactly 20 hours.
<head>
<meta http-equiv="refresh" content="72000; https://w3.org" />
</head>
Inapplicable
Example 1 - Inapplicable
No content
attribute.
<head>
<meta http-equiv="refresh" />
</head>
Example 2 - Inapplicable
No http-equiv="refresh"
attribute.
<head>
<meta content="30" />
</head>
Example 3 - Inapplicable
content
attribute is invalid and therefore inapplicable.
<head>
<meta http-equiv="refresh" content="0: https://w3.org" />
</head>
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/bc659a/. Copyright © 2023 W3C® (MIT, ERCIM, Keio, Beihang).