writing-accessibility-tests

Run axe-core WCAG scans with Playwright assertions for web accessibility.

1|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/mattobee/skills --skill writing-accessibility-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-accessibility-tests
Source: https://github.com/mattobee/skills/tree/main/skills/writing-accessibility-tests
Command: npx skills add https://github.com/mattobee/skills --skill writing-accessibility-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates web accessibility testing by combining axe-core scans with Playwright assertions to identify and prevent accessibility regressions early in the development process.

Core Features & Use Cases

  • Two-layer testing approach: automated axe-core scans plus targeted Playwright assertions to cover gaps in accessibility coverage.
  • Setup and reuse: provides a reusable scan function and fixture patterns to minimize boilerplate in test suites.
  • Real-world guidance: includes practical patterns for accessible names, landmarks, ARIA states, focus management, and dark mode scanning.

Quick Start

Run a test that performs an axe-core WCAG scan followed by targeted Playwright assertions for accessible names and landmarks.

Frequently Asked Questions about writing-accessibility-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate accessibility testing with Playwright and axe-core?

Automate web accessibility testing by running an axe-core WCAG scan within Playwright and pairing it with targeted assertions, using reusable scan functions and fixture patterns to minimize test boilerplate.

What is the best way to test dynamic content and interactive widgets for accessibility?

Test dynamic content and interactive widgets by pairing automated axe-core WCAG scans with targeted Playwright assertions that validate accessible names, landmarks, ARIA states, and focus management across common routes.

Do I need Playwright and axe-core as dev dependencies to set up accessibility tests?

Yes, you need Playwright and @axe-core/playwright installed as dev dependencies, plus project-level test scaffolding including reusable scan functions and fixture patterns to execute the two-layer accessibility tests.

Can I run axe-core accessibility scans in both light and dark themes?

Yes, you can run axe-core accessibility scans in both light and dark themes, applying the two-layer Playwright testing approach across theme variations to ensure visual compliance and contrast.

Why combine automated axe-core scans with manual Playwright assertions for accessibility?

Combining automated axe-core scans with targeted Playwright assertions covers gaps in accessibility testing by identifying broad WCAG violations while validating specific interactive behaviors like focus management and ARIA states.