Text spacing check (WCAG 1.4.12)
check_text_spacingSimulates WCAG text spacing overrides to detect clipped or overlapping text in fixed-height or fixed-width elements such as buttons, cards, and headings.
Instructions
Overrides line height to 1.5, paragraph spacing to 2em, letter spacing to 0.12em and word spacing to 0.16em, then compares before and after to detect text that becomes clipped or starts to overlap. Finds the problems typical of buttons, cards and headings with a fixed height or width.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "check_text_spacing"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to check (http, https or file). A dev server such as http://localhost:3000/ works too. | |
| width | No | Viewport width in CSS px. Default 1280. | |
| height | No | Viewport height in CSS px. Default 720. | |
| waitMs | No | Extra time to wait after load, in milliseconds. | |
| waitForSelector | No | After load, wait until an element matching this CSS selector appears. Use it to wait for an SPA to render. |