
accessibility-selenium-testing
Accessibility testing toolkit using Selenium WebDriver 4+ with Java 21+ and axe-core engine. Use when asked to validate WCAG 2.2 AA compliance, scan pages or components for a11y violations, test keyboard navigation, audit color contrast, check ARIA semantics, generate accessibility reports, filter axe rules, debug screen reader issues, or implement POUR principles (perceivable, operable, understandable, robust).
- Installs
- 39
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/fugazi/test-automation-skills-agents --skill accessibility-selenium-testing- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads accessibility-selenium-testing automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Accessibility Testing with Selenium WebDriver & Axe Core
This skill enables automated accessibility analysis within the Selenium WebDriver framework using the axe-core engine to detect WCAG violations and best practice issues directly in the browser.
Activation: This skill is triggered when you need to validate WCAG compliance, scan for accessibility violations, test keyboard navigation, audit ARIA semantics, or generate a11y reports.
First Questions to Ask
- What app URL(s) or user flows are in scope (and what is explicitly out of scope)?
- Is there an existing Selenium setup and how is CI run?
- Which standard is the target (WCAG 2.2 AA by default), and are there org-specific policies?
- Which pages/components are highest risk (auth, checkout, forms, modals, navigation)?
- Are there known constraints (legacy markup, third-party widgets) that require exceptions?
Prerequisites
| Component | Version | Purpose |
|---|---|---|
| Java JDK | 21+ | Runtime with modern features |
| Maven | 3.9+ | Dependency management |
| Selenium WebDriver | 4.x | Browser automation |
| axe-core-selenium | 4.10+ | Deque axe-core integration |
| JUnit 5 | 5.10+ | Test framework |
| AssertJ | 3.x | Fluent assertions for readable failures |
| Allure | 2.x | Reporting with a11y violation attachments |
Note: Use
com.deque.html.axe-core:seleniumMaven dependency for axe integration.
Target: WCAG 2.2 AA (
wcag2a,wcag2aa,wcag21a,wcag21aa,wcag22a,wcag22aa). See WCAG 2.2 spec.
Do NOT Use For
- Playwright/TypeScript accessibility testing (use
a11y-playwright-testing). - Authoring Selenium functional UI tests (use
webapp-selenium-testing). - Full conformance sign-off — automated axe scans catch ~30-50% of issues; manual audit + assistive-tech testing is still required.
Axe-Core Tools Reference
AxeBuilder Configuration
| Method | Purpose | Example |
|---|---|---|
new AxeBuilder() | Create scanner instance | Entry point |
.withTags(List<String>) | Filter by WCAG tags | wcag2aa, wcag21aa, wcag22aa |
.include(String) | Scan specific selector | #main-content |
.exclude(String) | Skip selector from scan | .third-party-widget |
.disableRules(List<String>) | Disable specific rules | color-contrast |
.withRules(List<String>) | Run only specific rules | label, button-name |
.analyze(WebDriver) | Execute the scan | Returns Results |
Results Object
| Method | Returns | Purpose |
|---|---|---|
getViolations() | List<Rule> | Rules that failed |
getPasses() | List<Rule> | Rules that passed |
getIncomplete() | List<Rule> | Rules needing manual review |
getInapplicable() | List<Rule> | Rules not applicable to page |
violationFree() | boolean | True if no violations |
Violation Impact Levels
| Impact | Severity | CI Action |
|---|---|---|
| Critical | Blocks users completely | Always fail build |
| Serious | Significant barrier | Always fail build |
| Moderate | Some difficulty | Warn or fail |
| Minor | Inconvenience | Log for review |
Step-by-Step Workflows
Workflow 1: Add A11y Scan to Existing Test
-
Add dependency to pom.xml
<dependency> <groupId>com.deque.html.axe-core</groupId> <artifactId>selenium</artifactId> <version>4.10.0</version> </dependency> -
Create AccessibilityHelper utility
- See Axe Patterns: Helper Scanning
-
Add scan after page loads
driver.get("https://example.com"); waitForPageReady(); AccessibilityHelper.verifyPageAccessibility(driver); -
Run and review violations
mvn test -Dtest=A11yTest
Workflow 2: Test Specific Component
-
Navigate to page with component visible
-
Trigger component state (open modal, show dropdown)
-
Scan only the component
Results results = new AxeBuilder() .withTags(List.of("wcag2a", "wcag2aa", "wcag22aa")) .include("#login-modal") .analyze(driver); -
Assert and log
Workflow 3: Keyboard Navigation Audit
- Identify all interactive elements
- Tab through the page programmatically
element.sendKeys(Keys.TAB); WebElement focused = driver.switchTo().activeElement(); - Verify focus order is logical
- Test Escape closes modals
- Verify no keyboard traps
Workflow 4: CI Integration
-
Configure headless browser
mvn test -Dheadless=true -Dgroups=a11y -
Set zero-tolerance for Critical/Serious
long criticalCount = violations.stream() .filter(v -> List.of("critical", "serious").contains(v.getImpact())) .count(); assertThat(criticalCount).isZero(); -
Generate JSON report for tracking
Code Patterns
See references/code-patterns.md for full AxeBuilder scan patterns, violation logging, JUnit 5 integration, and CI/CD YAML.
Key snippet:
Results results = new AxeBuilder()
.withTags(List.of("wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "wcag22a", "wcag22aa"))
.analyze(driver);
assertThat(results.violationFree()).as("A11y violations").isTrue();
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Axe returns empty results | Page not fully loaded | Add explicit wait for page ready state |
| False positives on contrast | Dynamic themes | Test both light and dark modes |
| Violations in third-party widgets | Cannot modify vendor code | Use .exclude() with documented ticket |
| Incomplete rules | Requires manual review | Log for manual audit, don't auto-fail |
| Different results between runs | Async content loading | Ensure deterministic page state before scan |
| CI fails but local passes | Different viewport/browser | Use same headless config as CI |
Triage by POUR Principles
| Principle | Focus Areas | Common Violations |
|---|---|---|
| Perceivable | Text alternatives, captions, contrast, structure | Missing alt text, low contrast, missing labels |
| Operable | Keyboard access, focus order, bypass blocks | Keyboard traps, no skip link, focus not visible |
| Understandable | Labels, predictable behavior, error handling | Unclear instructions, unexpected changes |
| Robust | Valid HTML, ARIA, name/role/value | Invalid ARIA, duplicate IDs, missing roles |
Running Tests
Maven Commands
| Command | Purpose |
|---|---|
mvn test -Dgroups=a11y | Run all accessibility tests |
mvn test -Dtest=A11yTest | Run specific test class |
mvn test -Dheadless=true | Run headless (CI mode) |
mvn allure:serve | View Allure report with violations |
CI/CD Integration
- name: Run Accessibility Tests
run: mvn test -Dgroups=a11y -Dheadless=true
- name: Upload A11y Report
uses: actions/upload-artifact@v3
with:
name: a11y-report
path: target/a11y-results/
Red Flags
- Treating a clean axe scan as full WCAG conformance — automation covers only ~30-50% of criteria.
- Globally disabling rules instead of scoped
.exclude()with a documented remediation ticket. - Scanning before the page is fully loaded — async content yields false "0 violations".
- Failing the build on
incompleterules — those need manual review, not automatic failure.
References
- Axe Patterns: Helper Scanning - Maven setup and AccessibilityHelper scanning methods
- Axe Patterns: Helper Processing - AccessibilityHelper results, filtering, logging, and reporting
- Axe Patterns: Tags & Tests - Common axe tags reference and test patterns
- Axe Patterns: Keyboard & CI/CD - Keyboard navigation testing and CI/CD integration
- Axe-Core API Reference - Full AxeBuilder config, Results object, and impact levels
- WCAG 2.2 AA Checklist: Perceivable & Operable - Manual audit checklist, POUR principles 1-2
- WCAG 2.2 AA Checklist: Understandable & Robust - Manual audit checklist, POUR principles 3-4 and assistive tech
- WCAG 2.2 AA Checklist: Additions & Exceptions - WCAG 2.2 additions, exception template, W3C references
- Deque Axe Rules - Rule descriptions
- W3C WCAG 2.2 - Official specification
- WAI-ARIA Practices - Widget patterns
Verification
- Axe WebDriver audit passes —
AxeBuilder.analyze(driver)returns zero critical violations - Keyboard accessibility verified — Tab navigation reaches all interactive elements
- WCAG 2.2 AA compliance — All rules for AA level pass (includes WCAG 2.2 additions: focus-not-obscured, dragging movements, target-size minimum)
FAQ
What does the accessibility-selenium-testing skill do?
Accessibility testing toolkit using Selenium WebDriver 4+ with Java 21+ and axe-core engine. Use when asked to validate WCAG 2.2 AA compliance, scan pages or components for a11y violations, test keyboard navigation, audit color contrast, check ARIA semantics, generate accessibility reports, filter axe rules, debug screen reader issues, or implement POUR principles (perceivable, operable, understandable, robust).
How do I install accessibility-selenium-testing?
Run npx skills add https://github.com/fugazi/test-automation-skills-agents --skill accessibility-selenium-testing in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/accessibility-selenium-testing/ (personal) or .claude/skills/accessibility-selenium-testing/ (project).
Which AI agents can use accessibility-selenium-testing?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is accessibility-selenium-testing safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains accessibility-selenium-testing?
It is published by fugazi in fugazi/test-automation-skills-agents. It has 39 recorded installs.
More from fugazi/test-automation-skills-agents
playwright-e2e-testing
fugazi/test-automation-skills-agents
Author and maintain versioned Playwright (@playwright/test) TypeScript UI specs for browser user flows. Use when asked to create, run, debug, or refactor E2E tests, form/navigation/auth flows, responsive checks, UI mocking, fixtures, Page Objects, or visual comparisons. Use api-testing for standalone REST/GraphQL contracts and playwright-cli for live browser sessions. Keywords: E2E spec, Playwright test, POM, fixtures, UI regression.
qa-manual-istqb
fugazi/test-automation-skills-agents
Create QA artifacts from requirements: test plans, test conditions/cases, bug reports, regression suites, traceability, and exploratory charters. Use for test planning, test design, defects, coverage, or QA deliverables. Applies ISTQB risk-based techniques and loads templates only when needed. Keywords: test plan, test case, bug report, traceability, regression suite, QA artifact.
a11y-playwright-testing
fugazi/test-automation-skills-agents
Accessibility testing for web applications using Playwright (@playwright/test), TypeScript, and axe-core. Use to write, run, or debug WCAG 2.2 AA checks, keyboard and focus tests, ARIA/semantic validation, accessible names, form labels, color contrast, or screen-reader test patterns. Keywords: accessibility, WCAG, axe-core, keyboard navigation, focus management, ARIA.
qa-test-planner
fugazi/test-automation-skills-agents
Generate ready-to-fill QA deliverables from markdown templates: test plans, manual test cases, automated Playwright specs, regression suites, and bug reports. Use when asked to draft or fill any of these artifacts from requirements or user stories. Keywords: test plan, test case, bug report, regression suite, playwright spec, test strategy, test design, template.
api-testing
fugazi/test-automation-skills-agents
Test REST and GraphQL endpoint contracts using Playwright request fixture (TypeScript) or REST Assured (Java). Use for standalone API tests covering schemas, auth, status/error handling, pagination, idempotency, rate limits, or contract checks; not for browser E2E specs. Keywords: REST, GraphQL, API contract, schema validation, REST Assured.
webapp-playwright-testing
fugazi/test-automation-skills-agents
Browser automation toolkit using Playwright MCP for testing web applications. Use when asked to navigate pages, click elements, fill forms, take screenshots, verify UI components, check console logs, debug frontend issues, or validate responsive design. Supports live browser interaction and accessibility snapshots.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.