meta-refresh-no-exceptions
Ensure that auto refresh is not enabled on a meta element of a webpage.
Description
The http-equiv="refresh"
attrbute is used on meta
elements of a webpage to enable auto refresh or to redirect to a new page after waiting for a few seconds. Such auto refresh or redirects can be jarring for users as they have no control over it. Screen readers and other assistive technologies might work unexpectedly in these scenarios. The meta-refresh-no-exceptions
rule flags any use of the http-equiv="refresh"
attribute on meta
elements of a webpage.
Success criteria
For this accessibility check to pass, your website must not use the http-equiv="refresh"
attribute on meta
elements.
Example
In the following example, the http-equiv="refresh"
attribute is used to refresh the webpage every ten seconds, which breaks the meta-refresh-no-exceptions
rule.
Similarly, in the following example, the http-equiv="refresh"
attribute is used to redirect to another webpage after five seconds, which breaks the meta-refresh-no-exceptions
rule.
In contrast, the following code snippet does not use the http-equiv="refresh"
attribute.
Hence, this code snippet doesn’t break the meta-refresh-no-exceptions
rule.
How to fix?
If this rule gets flagged, remove the http-equiv="refresh"
attribute on meta
elements to fix it. If redirects or refresh is absolutely necessary, use javascript to implement them or implement it on the server side.
Reference
- WCAG 2.2.4: Interruptions
- WCAG 3.2.5: Change on Request
- Meta refresh - Accessibility issues
- WCAG - meta refresh
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!