Skip to main content
JUMP TO:Quick StartCLI CommandsConfigurationPlaywright APIMCP ServerGitHub Actions
Guides / Accessibility Audits(14 of 37)

Accessibility Audits

OPTIONAL PLUGIN. The accessibility plugin depends on @axe-core/playwright and reports automated findings alongside a run.

Run automated axe-core accessibility checks alongside visual regression screenshots. The plugin audits captured route/viewport pairs in Chromium pages that use the same storage state, color scheme, viewport height, wait, and route actions as the capture.

9-Hook Plugin Architecture and WCAG Accessibility Audits
FIG 01 · UNIFIED RENDER AUDITS — @AXE-CORE/PLAYWRIGHT WCAG CHECKS IN THE AFTERRENDER HOOK

Status

Install the optional dependency and import the plugin from @frontguard/cli/plugins. Automated axe results do not establish WCAG conformance and do not replace keyboard or assistive-technology review.

Use

terminal: install optional peer dependency
$ npm install -D @axe-core/playwright@~4.13.0
frontguard.config.ts: register the accessibility plugin
import { createAccessibilityPlugin } from '@frontguard/cli/plugins'

export default {
  version: 1,
  baseUrl: 'http://localhost:3000',
  routes: ['/', '/pricing', '/checkout'],
  plugins: [
    createAccessibilityPlugin({
      impact: 'serious', // Report serious and critical violations
      failOnViolation: true,
    }),
  ],
}

Configuration & options

OptionTypeDefaultDescription
impact'minor' | 'moderate' | 'serious' | 'critical''minor'Minimum severity to report. Set serious with failOnViolation to fail on serious and critical violations.
rulesstring[]undefinedOptional allowlist of axe rule IDs, not selectors or WCAG tags.
excludeRulesstring[]undefinedOptional denylist of axe rule IDs. Element selector exclusions are not supported. Unknown option keys produce a warning.
failOnViolationbooleanfalseFail on reported violations at or above impact; when impact is omitted the failure cutoff is serious.

Limit

Automated axe-core rules catch common contrast, missing label, and ARIA role errors, but cannot verify keyboard focus traps, screen-reader announcement order, or cognitive usability. Always pair automated checks with manual assistive-technology testing.