meta-refresh
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: offhtml/html-validate-recommended
What it does
Section titled “What it does”Reports <meta http-equiv="refresh"> with a delay (content="5"). A delay of 0 is not reported.
Why it matters
Section titled “Why it matters”A page that reloads or redirects by itself after a time takes the control from the user, disorients screen reader users and cannot be paused.
To fix, redirect on the server, or use a 0 delay; for a reload, give the user a button.
Example
Section titled “Example”...<html lang="en"><head>...<meta http-equiv="refresh" content="5"><meta http-equiv="refresh" content="0; url=/new"></head><body>...Configuration
Section titled “Configuration”angular: lint: rules: meta-refresh: warn # off (default), warn, errorhtml: lint: rules: meta-refresh: warn # off (default), warn, errorsvelte: lint: rules: meta-refresh: warn # off (default), warn, errorvue: lint: rules: meta-refresh: warn # off (default), warn, errorEnabled by the presets: html/html-validate-recommended.
Suppress one line with sudsy-disable-next-line meta-refresh in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| html-validate | meta-refresh |
partial | a delay is any content that starts with a nonzero digit; no allowLongDelay option |