Usage with Puppeteer

Puppeteer is a Node.js library for driving headless or full Chrome/Chromium via the DevTools protocol — browser automation and scripting, often used for testing but not a test framework on its own. surea11y integrates through the @surea11y/puppeteer binding.

$ npm install @surea11y/puppeteer puppeteer

Puppeteer downloads its own bundled Chrome as part of npm install — unlike Playwright, there's no separate browser-install step.

const puppeteer = require('puppeteer');
const { A11yCoreBuilder } = require('@surea11y/puppeteer');
 
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/');
 
const results = await new A11yCoreBuilder({ page })
.include('#main') // optional -- call multiple times for multi-region scans
.exclude('.cookie-banner') // optional
.withTags(['wcag2a', 'wcag2aa'])
.disableRules(['meta-refresh-no-exceptions'])
.analyze();
 
console.log(results.checksResults.filter(r => r.outcome === 'fail'));
await browser.close();

Also see a runnable example in the package's own repo.

Next: choose which rules run, integrate the scan into CI, and review the full result schema.