attribute-that-does-nothing
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when one of six camelCase names — httpEquiv, acceptCharset, defaultValue, defaultChecked, innerHTML, textContent — reaches the DOM as itself, where no browser reads it.
An HTML attribute is written through setAttribute, which lowercases the name. Exactly two
names are aliased on the way, because they are reserved words: className becomes class
and htmlFor becomes for. Everything else is written as it stands.
So a camelCase name whose real attribute is spelled differently arrives as something no browser has heard of. It renders, it does nothing, and there is nothing on the page to see.
The types refuse all of these at the call site, with the right spelling in the error — so
reaching this report means a @ts-ignore, a cast, or a file with no types at all.
It is six names and nothing else. An attribute nothing in the framework reads is not a
fault: a data-* written for a CSS selector or a test hook is exactly what data-* is for,
and this never reports one. What is reported is a name that was MEANT to do something and
cannot, because HTML spells it differently.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.