Which error message belongs to which field — and which belongs to nothing
qa_wiringChecks whether form error messages are actually wired to their fields, reporting orphaned messages and invalid fields with no reason given. Optionally draws the wiring as a PNG.
Instructions
A FORM WITH THREE RED MESSAGES UNDER THREE FIELDS LOOKS CORRECT TO EVERYONE WHO CAN SEE IT. That is the illusion: being NEAR a field is not being attached to it, and assistive technology reads the attachment. Somebody filling the form by ear is told «Email» and nothing else, while «Enter a valid email address» sits in red an inch below, invisible to them. Nobody can check this by looking, which is why it survives in shipped products for years. This reads the wire out of the tree — aria-errormessage, aria-describedby, label — and reports: which messages are attached to which fields, which messages are attached to NOTHING, and which fields are marked invalid with no reason given at all. Pass draw to get the picture: a line from every field to its message, and a stub on every message whose line ends in mid-air. It deliberately under-reports: a message inside its field's label, and an error summary that links to its fields, are both correct by another route and are not called orphans. A wrongly accused form costs somebody an afternoon proving the tool wrong.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "qa_wiring"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draw | No | Write a PNG here with the wiring drawn on the page: green lines for attached messages, red stubs for orphans | |
| tabId | No | Target tab (from qa_tabs); omit for the active tab |