no-multiple-main
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/html-validate-standard
What it does
Section titled “What it does”Reports a second <main> element that is not hidden.
Why it matters
Section titled “Why it matters”A page has one main landmark; a second one makes the shortcut of a screen reader to the main content ambiguous.
To fix, use one <main>, or mark the other hidden.
Example
Section titled “Example”...<table><tbody><tr><td>a</td></tr></tbody></table><main></main><main hidden></main><main></main><p id="a"></p>...Configuration
Section titled “Configuration”angular: lint: rules: no-multiple-main: warn # off, warn (default), errorhtml: lint: rules: no-multiple-main: warn # off, warn (default), errorsvelte: lint: rules: no-multiple-main: warn # off, warn (default), errorvue: lint: rules: no-multiple-main: warn # off, warn (default), errorEnabled by the presets: html/html-validate-standard.
Suppress one line with sudsy-disable-next-line no-multiple-main in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| html-validate | no-multiple-main |
full |