Last updated:

Created by:

Success Criterion:

Description

This rule checks that the meta element is not used for delayed redirecting or refreshing.

Accessibility Requirements

This conformance rule relates to:

Test procedure

Applicability

The rule applies to the first valid <meta http-equiv="refresh"> element with a content attribute in a document.

Expectation

The time of the content attribute is 0 or greater than 72000 (20 hours).

Note: See Refresh state (http-equiv="refresh") for a precise description on how to determine the time.

Assumptions

Accessibility Support

There are no major accessibility support issues known for this rule.

Background

Test Cases

Passed

Passed example 1

Redirects immediately.

Code Snippet:
   <head>           
    <meta http-equiv="refresh" content="0; URL='https://github.com'" />    
  </head>  
 
Example Output: Open in a new tab/ window

Passed example 2

First valid <meta http-equiv="refresh"> redirects immediately.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="0; http://example.com" />
  <meta http-equiv="refresh" content="5; http://example.com" />
</head>
 
Example Output: Open in a new tab/ window

Passed example 3

Redirects after more than 20 hours.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="72001; http://example.com" />
</head>
 
Example Output: Open in a new tab/ window

Failed

Failed example 1

Refreshes after 30 seconds.

Code Snippet:
 <head>
	<meta http-equiv="refresh" content="30">
</head>
 
Example Output: Open in a new tab/ window

Failed example 2

Redirects after 30 seconds.

Code Snippet:
 <head>
	<meta http-equiv="refresh" content="30; URL='https://github.com'">
</head>
 
Example Output: Open in a new tab/ window

Failed example 3

First <meta http-equiv="refresh"> element is not valid, second one redirects after 5 seconds.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="0: http://example.com" />
  <meta http-equiv="refresh" content="5; http://example.com" />
</head>
 
Example Output: Open in a new tab/ window

Failed example 4

Redirects after exactly 20 hours.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="72000; http://example.com" />
</head>
 
Example Output: Open in a new tab/ window

Inapplicable

Inapplicable example 1

No content attribute.

Code Snippet:
 <head>
	<meta http-equiv="refresh">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 2

No http-equiv="refresh" attribute.

Code Snippet:
 <head>
	<meta content="30">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 3

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="0: http://example.com" />
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 4

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>
	<meta http-equiv=refresh content="-00.12 foo">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 5

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>
	<meta http-equiv="refresh" content="; 30">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 6

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>
	<meta http-equiv="refresh" content="">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 7

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>
  <meta http-equiv="refresh" content="+5; http://example.com">
</head>
 
Example Output: Open in a new tab/ window

Inapplicable example 8

content attribute is invalid and therefore inapplicable.

Code Snippet:
 <head>           
  <meta http-equiv="refresh" content="foo; URL='https://github.com'" />
</head>
 
Example Output: Open in a new tab/ window

Test Aspects

Test aspects are defined as part of the ACT Rules format 1.0.
  • DOM Tree

Contribute






GitHub

Contributing is open to anyone. We welcome any new issues or pull requests for changes. Auto WCAG Rules has conference calls every 4 weeks. If you are interested in becoming an active contributor or reviewer, we ask that you join the Auto WCAG Rules community group through the W3C Website. This requires setting up a W3C account, may require approval by the organization you work for if they are a W3C member.

Learn more about contributing to Auto WCAG Rules Join the Auto WCAG Rules community group now!