本文へ移動
cccskills
無料GitHub で公開

accessibility-test

Automated WCAG 2.1 AA accessibility testing with axe-core and Lighthouse CI. Auto-detects frontend framework (React, Next.js, Vue, Angular, Svelte, Astro, Flutter, React Native), discovers all routes and interactive components, installs Playwright + axe-core for page-level scanning and jest-axe/vitest-axe for component-level testing. Generates tests for color contrast (4.5:1), alt text, form labels, ARIA attributes, heading order, landmark regions, focus visibility, keyboard navigation (tab order, focus traps, modal focus management, skip-to-content), screen reader compatibility (aria-live regions, error announcements, toast notifications), and Flutter Semantics validation (48dp touch targets, semanticLabel). Reports violations by severity (critical, serious, moderate, minor) with WCAG criterion references. Use when adding a11y testing, auditing accessibility compliance, fixing contrast issues, or validating keyboard and screen reader support.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md15.6 KB
  • source.json1.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

You are in AUTONOMOUS MODE. Do NOT ask questions. Detect the frontend framework, set up accessibility testing with axe-core and Lighthouse CI, generate a11y tests for all pages/routes, and produce a violations report organized by severity.

INPUT: $ARGUMENTS

If arguments are provided, focus on those specific pages, components, or WCAG criteria. If no arguments are provided, test ALL pages and routes for WCAG 2.1 AA compliance.

============================================================ PHASE 1: FRONTEND DISCOVERY

Step 1.1 -- Detect Frontend Framework

IndicatorFramework
next.config.*Next.js
nuxt.config.*Nuxt
angular.jsonAngular
svelte.config.*SvelteKit
vite.config.* + ReactReact + Vite
vite.config.* + VueVue + Vite
package.json with react-scriptsCreate React App
pubspec.yaml with flutterFlutter
package.json with expoReact Native (Expo)
astro.config.*Astro

Step 1.2 -- Detect Existing A11y Tools

IndicatorTool
jest-axe in package.jsonjest-axe
@axe-core/playwright in package.jsonPlaywright axe
cypress-axe in package.jsonCypress axe
@axe-core/react in package.jsonReact axe (dev overlay)
pa11y in package.jsonPa11y
lighthouserc.* or @lhci/cliLighthouse CI
.a11yrc or a11y.config.*Custom a11y config
Semantics widgets in FlutterFlutter a11y (built-in)

Step 1.3 -- Discover All Routes and Pages

Use the same route discovery method as /e2e Phase 0, Step 0.2.

Build the page inventory:

#RoutePage NameAuth RequiredInteractive ElementsForms

Identify component-level testing targets:

  • Reusable UI components (buttons, inputs, modals, navbars)
  • Custom interactive widgets (date pickers, sliders, autocomplete)
  • Dynamic content areas (accordions, tabs, carousels, tooltips)

============================================================ PHASE 2: TOOL SETUP

Step 2.1 -- Install A11y Testing Tools

FOR WEB PROJECTS (React, Next.js, Vue, Angular, Svelte, Astro):

Primary tool -- Playwright + axe-core (page-level testing):

  • Install: npm install -D @axe-core/playwright
  • Provides: Full page a11y scanning with Playwright browser automation

Secondary tool -- jest-axe or vitest-axe (component-level testing):

  • Install: npm install -D jest-axe (for Jest) or npm install -D vitest-axe (for Vitest)
  • Provides: A11y checks on rendered components in unit tests

Reporting tool -- Lighthouse CI:

  • Install: npm install -D @lhci/cli
  • Provides: Automated Lighthouse scores including accessibility score
  • Create lighthouserc.js config

FOR FLUTTER:

No extra installation needed. Flutter has built-in Semantics testing.

  • Use WidgetTester to verify Semantics tree
  • Use flutter test --test-semantics for semantic validation
  • Use integration_test for full-app a11y flows

Step 2.2 -- Configure Lighthouse CI

Create lighthouserc.js (or .lighthouserc.json):

Configuration must include:

  • URLs to test (all discovered routes)
  • Assertions for accessibility score:
    • minScore: 0.9 (WCAG 2.1 AA target = 90%+)
  • Number of runs: 3 (for stability)
  • Preset: "lighthouse:no-pwa" (focus on accessibility, not PWA)
  • Categories to audit: accessibility, best-practices

Step 2.3 -- Configure axe-core Rules

Set up axe-core with WCAG 2.1 AA as the baseline:

Rule tags to enable:

  • wcag2a: WCAG 2.0 Level A
  • wcag2aa: WCAG 2.0 Level AA
  • wcag21a: WCAG 2.1 Level A
  • wcag21aa: WCAG 2.1 Level AA
  • best-practice: Additional best practice rules

Rules to explicitly verify:

  • color-contrast: Text has sufficient contrast ratio (4.5:1 normal, 3:1 large)
  • image-alt: All images have alt text
  • label: All form inputs have labels
  • link-name: All links have discernible text
  • button-name: All buttons have discernible text
  • document-title: Page has a title
  • html-has-lang: HTML element has lang attribute
  • landmark-one-main: Page has one main landmark
  • region: All content is within landmarks
  • aria-required-attr: ARIA elements have required attributes
  • aria-valid-attr-value: ARIA attributes have valid values
  • heading-order: Headings are in sequential order
  • tabindex: No tabindex > 0 (disrupts tab order)
  • focus-visible: Focused elements have visible focus indicator

============================================================ PHASE 3: TEST GENERATION

Step 3.1 -- Page-Level A11y Tests (Playwright + axe)

FOR EACH page in the inventory, generate a test file:

test('[page-name] - accessibility', async ({ page }) => {
  // Navigate and wait for page to be fully loaded
  // Inject axe-core
  // Run full page scan with WCAG 2.1 AA tags
  // Assert zero violations
})

Each page test must:

  1. Navigate to the page (with authentication if required)
  2. Wait for all content to load (network idle, fonts, images)
  3. Run axe-core scan with wcag2a, wcag2aa, wcag21a, wcag21aa tags
  4. Capture all violations with:
    • Rule ID and description
    • Impact level (critical, serious, moderate, minor)
    • Affected HTML element
    • WCAG success criterion violated
    • Fix suggestion

Test interactive states for each page:

  • Default state (page loaded)
  • After opening a modal/dialog (check focus trap, aria attributes)
  • After expanding an accordion/dropdown (check aria-expanded)
  • After triggering an error state (check error messages are announced)
  • After form validation failure (check error association with inputs)

Step 3.2 -- Keyboard Navigation Tests

FOR EACH page, generate keyboard navigation tests:

TAB ORDER:

  1. Press Tab repeatedly from the top of the page
  2. Verify focus moves in a logical reading order
  3. Verify no element is skipped
  4. Verify no focus trap (except intentional ones in modals)
  5. Verify focus is visible on every focused element

KEYBOARD INTERACTIONS:

  • Buttons: Enter and Space activate
  • Links: Enter activates
  • Checkboxes: Space toggles
  • Radio buttons: Arrow keys move between options
  • Dropdowns/Select: Arrow keys navigate options, Enter selects
  • Modals: Escape closes, Tab stays within modal (focus trap)
  • Menus: Arrow keys navigate, Escape closes
  • Tabs: Arrow keys switch tabs
  • Accordions: Enter/Space toggles

FOCUS MANAGEMENT:

  • When a modal opens, focus moves to the first focusable element inside
  • When a modal closes, focus returns to the trigger element
  • After deleting an item, focus moves to a sensible element (next item or heading)
  • Skip-to-content link works (first Tab stop, jumps to main content)

Step 3.3 -- Component-Level A11y Tests

FOR reusable components, generate unit-level a11y tests:

Using jest-axe or vitest-axe:

  1. Render the component in isolation
  2. Run axe on the rendered output
  3. Assert zero violations

Test each component variant:

  • Default state
  • Disabled state
  • Error state
  • Loading state
  • With different prop combinations

Verify semantic HTML:

  • Buttons use <button>, not <div onclick>
  • Links use <a href>, not <span onclick>
  • Headings use <h1>-<h6> in order
  • Lists use <ul>/<ol>/<li>
  • Tables use <table>/<thead>/<tbody>/<th> with scope
  • Forms use <form> with <label> elements linked to inputs

Step 3.4 -- Screen Reader Compatibility Tests

Generate tests to verify screen reader announcements:

ARIA LIVE REGIONS:

  • Dynamic status messages use aria-live="polite"
  • Error alerts use aria-live="assertive" or role="alert"
  • Loading indicators announce state changes
  • Toast/snackbar notifications are announced

ARIA LABELS:

  • Icon-only buttons have aria-label
  • Complex widgets have aria-labelledby or aria-describedby
  • Decorative images have aria-hidden="true" or empty alt=""
  • Navigation landmarks have aria-label when multiple exist

FORM ACCESSIBILITY:

  • Each input has an associated <label> (htmlFor/for attribute)
  • Required fields are marked with aria-required="true"
  • Error messages are linked with aria-describedby
  • Fieldsets group related inputs with <legend>
  • Error state uses aria-invalid="true"

Step 3.5 -- Flutter-Specific A11y Tests (if Flutter)

Generate tests using Semantics finders:

  • Verify every tappable widget has a Semantics label
  • Verify images have semanticLabel property
  • Verify custom widgets expose Semantics (onTap, label, value, hint)
  • Verify text contrast meets 4.5:1 (check theme colors)
  • Verify touch targets are at least 48x48dp
  • Verify ExcludeSemantics is not hiding important content
  • Test with semantics debugger enabled
  • Run: flutter test --test-semantics

============================================================ PHASE 4: EXECUTION

Step 4.1 -- Start the Application

Start the frontend dev server (same as /e2e Phase 1). Wait for the server to be fully ready.

Step 4.2 -- Run axe-core Tests

Execute page-level a11y tests:

ToolCommand
Playwright + axenpx playwright test a11y-tests/ --reporter=list
Cypress + axenpx cypress run --spec "cypress/e2e/a11y/**"
jest-axenpx jest tests/a11y/ --verbose
Flutterflutter test test/a11y/

Step 4.3 -- Run Lighthouse CI

Execute Lighthouse accessibility audits:

lhci autorun --config=lighthouserc.js

Or for individual pages: lhci collect --url=http://localhost:PORT/page1 --url=http://localhost:PORT/page2 lhci assert

Record the accessibility score for each page.

Step 4.4 -- Compile Violations

Merge results from axe-core and Lighthouse into a unified violations list. Deduplicate violations that appear in both tools.

============================================================ SELF-HEALING VALIDATION (max 3 iterations)

After generating and running tests, validate:

  1. All generated test files compile/parse without syntax errors.
  2. Run the generated tests — capture pass/fail results.
  3. If tests fail due to test code bugs (not application bugs), fix the test code.
  4. Re-run to confirm tests pass or legitimately fail on application issues.
  5. Repeat up to 3 iterations.

IF STILL FAILING after 3 iterations:

  • Separate test failures into: test bugs vs application bugs
  • Fix test bugs, document application bugs

============================================================ OUTPUT

Accessibility Test Report

Setup

  • Framework: [detected]
  • A11y tools: [axe-core, Lighthouse CI, jest-axe, etc.]
  • WCAG level: 2.1 AA (baseline)
  • Pages tested: [count]
  • Components tested: [count]

Lighthouse Accessibility Scores

PageScoreStatus
[page][0-100][PASS >= 90 / FAIL < 90]
AverageN[verdict]

Violations by Severity

Critical (must fix immediately)

#RuleWCAG CriterionPageElementDescriptionFix

Serious (should fix before release)

#RuleWCAG CriterionPageElementDescriptionFix

Moderate (fix in next sprint)

#RuleWCAG CriterionPageElementDescriptionFix

Minor (improvement opportunity)

#RuleWCAG CriterionPageElementDescriptionFix

Violation Summary

  • Critical: N
  • Serious: N
  • Moderate: N
  • Minor: N
  • Total violations: N

Keyboard Navigation Results

PageTab OrderFocus VisibleKeyboard OperableFocus Management

WCAG 2.1 AA Compliance Checklist

CriterionDescriptionStatusNotes
1.1.1Non-text Content (alt text)PASS/FAIL
1.3.1Info and Relationships (semantic HTML)PASS/FAIL
1.4.3Contrast (Minimum) 4.5:1PASS/FAIL
1.4.11Non-text Contrast 3:1PASS/FAIL
2.1.1Keyboard accessiblePASS/FAIL
2.4.3Focus Order logicalPASS/FAIL
2.4.7Focus VisiblePASS/FAIL
3.3.1Error IdentificationPASS/FAIL
3.3.2Labels or InstructionsPASS/FAIL
4.1.2Name, Role, Value (ARIA)PASS/FAIL

Accessibility Grade

  • AAA READY: Zero violations, score 95+, all keyboard tests pass
  • AA COMPLIANT: Zero critical/serious, score 90+, keyboard navigable
  • PARTIAL: Some serious violations, score 70-89, keyboard issues
  • NON-COMPLIANT: Critical violations, score < 70, keyboard broken

NEXT STEPS:

  • "Critical violations found? Fix them immediately -- they block users with disabilities."
  • "Run /visual-regression to verify fixes do not break the visual design."
  • "Run /e2e to verify a11y fixes do not break functionality."
  • "Run /test-suite to see overall test health with a11y coverage."
  • "Add Lighthouse CI and axe checks to your CI pipeline to prevent regressions."
  • "Consider manual testing with VoiceOver (macOS), NVDA (Windows), or TalkBack (Android)."

DO NOT:

  • Do NOT lower the WCAG target below AA. AA is the legal and ethical minimum.
  • Do NOT suppress axe-core rules without a documented justification.
  • Do NOT skip keyboard navigation testing. Mouse-only interfaces exclude users.
  • Do NOT add aria-label to elements that already have visible text labels.
  • Do NOT use aria-hidden="true" on interactive or informative elements.
  • Do NOT generate tests for non-visual projects (CLIs, APIs, backend services).
  • Do NOT treat a passing Lighthouse score as complete a11y compliance. Automated tools catch ~30% of issues.
  • Do NOT add role="presentation" or role="none" to meaningful content.
  • Do NOT ignore color contrast. It is the most common a11y violation.

============================================================ SELF-EVOLUTION TELEMETRY

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /accessibility-test — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

007

無料

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Run a health check on an existing project: dependency audit, security scan, test runner detection, CI/CD evaluation, and missing configuration analysis. Maps the three execution gates (pre/in/post) from /10x-bootstrapper to an assessment framework for existing codebases. Reads optional context/foundation/stack-assessment.md from /10x-stack-assess to focus checks on identified gaps. Writes context/foundation/health-check.md with findings, prioritized fixes, and an agent-readiness verdict. Use when the user has an existing project and wants to verify its health before working with an agent. Trigger phrases: "health check", "check my project", "audit my project", "is my project healthy", "sprawdź projekt", "audyt projektu", "health-check", "project health". Use AFTER /10x-stack-assess (brownfield chain), BEFORE agent onboarding (m1-l4).

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

10x-team

無料

You MUST use this when building projects end-to-end. Orchestrates all 12 team roles — automatically switches between CTO, architect, PM, engineers, SRE, security, DBA, QA, and EM based on the current phase of work. Starts with brainstorming before any implementation.

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) — through a consultative, modular step-by-step approach that only adds what you actually need. This should trigger for requests such as Add Maven plugins in pom.xml; Improve Maven plugins in pom.xml. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

aibot88 のスキルをすべて見る

このスキルの問題を報告する