no-missing-references
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/html-validate-standard
What it does
Section titled “What it does”Reports an attribute that refers to an id (for, aria-labelledby, list, headers, form, …) when no element of the document has that id.
Why it matters
Section titled “Why it matters”A reference to nothing silently does nothing: a label that labels no control, a description that is never read, a list that offers no choices.
To fix, correct the id or add the element that has it.
Example
Section titled “Example”...<label for="y">y</label><input type="text" id="y"><label for="missing">z</label><p aria-labelledby="y nothere"></p>Configuration
Section titled “Configuration”angular: lint: rules: no-missing-references: warn # off, warn (default), errorhtml: lint: rules: no-missing-references: warn # off, warn (default), errorsvelte: lint: rules: no-missing-references: warn # off, warn (default), errorvue: lint: rules: no-missing-references: warn # off, warn (default), errorEnabled by the presets: html/html-validate-standard.
Suppress one line with sudsy-disable-next-line no-missing-references 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 | no-missing-references |
partial | no include and exclude options |