Touch target estimate from CSS
touch_target_cssStatic estimate of the rendered size of interactive elements (a, button, input, select, textarea, summary, role=button/link, onclick) for WCAG 2.5.8 Target Size (Minimum, 24px) and the 44px guidance. Pass html and css, or a public url (page plus up to 12 stylesheets). It matches CSS rules to elements, uses explicit width/height/min sizes, padding, border, line-height and font-size (with browser defaults for form controls), guesses text width, reads margins and gap including li > a wrappers, and decides whether a neighboring control exists. Output groups elements by kind with a status: fail-estimate, under-24-isolated, under-24-spaced, inline (exempt inside a sentence), unknown (icon-only with no stated size) or ok. Optional viewport (default 390) selects media queries. States plainly that it is an estimate and includes a Puppeteer snippet for the rendered measurement. It does not apply state, sibling or structural selectors, transforms, container queries or script-set sizes.
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": "touch_target_css"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | CSS source. | |
| url | No | A public page URL to fetch. | |
| html | No | HTML markup. | |
| viewport | No | Viewport width in px for media queries. Default 390. |