Ramonda

reference-to-an-id-that-is-not-there

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 an aria-labelledby, htmlFor or other id reference names an id no element in the project carries.

These attributes do not describe an element — they POINT at one, by id. When the pointer resolves to nothing the attribute does not fall back to anything; it does nothing at all, silently, and the page looks exactly the same.

aria-labelledby is usually an element's only name, so a broken one leaves a dialog announced as "dialog" and nothing more. A broken htmlFor leaves the input unnamed AND stops the label focusing it, which is the one half somebody might notice.

Check the spelling against the element you meant, and remember that aria-labelledby takes a LIST — every id in it has to resolve, and each is checked here on its own.

Where a name is a single string rather than a pointer at existing markup, aria-label says it directly and cannot break this way.

Next