A11yScope

v0.3.0
io.github.perceivable/a11yscope Checked 4 days ago Published 1 month ago

WCAG 2.2 AA accessibility checks for pages and HTML, run locally in headless Chrome.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_page Scan a page for WCAG 2.2 AA issues

Loads a URL (http/https) or a local HTML file path in headless Chrome, runs the A11yScope engine, and returns violations grouped by rule with CSS selectors and HTML snippets. Needs the page to be reachable from this machine.

ParameterTypeDescription
url *stringhttp(s) URL, file:// URL, or a path to an HTML file (relative to the server's working directory).
include_passedbooleanAlso list rules with zero findings, each with status passed or inapplicable and its checked count.
include_reviewbooleanAlso return items that need a human decision (not failures).
max_findings_per_ruleintegerCap on findings returned per rule.
viewport_heightinteger
viewport_widthinteger
wait_msintegerExtra time to wait after load, for pages that render late.

scan_html Scan an HTML string for WCAG 2.2 AA issues

Renders the given HTML in headless Chrome and scans it. Use this for markup you generated or are about to write. Pass base_url when the HTML references relative stylesheets or images that live on a server you can reach; otherwise inline the CSS, since contrast checks depend on computed styles.

ParameterTypeDescription
html *stringA complete HTML document or a fragment.
base_urlstringOrigin to resolve relative URLs against; the HTML is served at this address.
include_passedbooleanAlso list rules with zero findings, each with status passed or inapplicable and its checked count.
include_reviewbooleanAlso return items that need a human decision (not failures).
max_findings_per_ruleintegerCap on findings returned per rule.
viewport_heightinteger
viewport_widthinteger

list_rules List the accessibility checks

The 31 checks A11yScope runs, each with its WCAG 2.2 success criteria, level, impact, and how to fix it.