Check a page's accessibility
check_accessibilityInspect a WordPress page's rendered HTML for accessibility problems, covering headings, images, links, forms, iframes, and colors, with WCAG references and fix suggestions.
Instructions
Fetch a page on the configured site and run deterministic accessibility checks on its server-rendered HTML: html lang, page title, a single h1 and no skipped heading levels, images without alt (alt="" is treated as decorative), links and buttons with no accessible name, generic link text ("read more", "click here"), form controls without labels, duplicate ids, iframes without title, autoplaying media, a viewport that disables zoom, and WCAG contrast of block colour classes (has-{slug}-color / has-{slug}-background-color and inline colours) resolved against the theme palette. Each issue has a WCAG reference, severity, snippet and fix. Works on draft-theme preview URLs from get_preview_url. It does not run JavaScript or compute CSS, so it complements rather than replaces a browser audit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Path or full same-site URL, e.g. "/about/", or a preview URL from get_preview_url (its query parameters are kept). | / |
| rules | No | Only run these rules. Omit for all. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| max_issues | No | Cap on issues listed; counts always cover every issue found. | |
| preview_token | No | Token from get_preview_url, to check a draft theme when passing a plain path. |