a11y-validate
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "a11y-validate":https://skillpi.com/zh/skills/deepskill-2686d76cf90a6d0adf2397a76a492fd691e336917243fd293e1845e218ba43ab。安装前核对上游来源和版本:https://github.com/softspark/ai-toolkit。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
无障碍验证器:关注 WCAG 2.1 AA、EN 301 549 与 EAA 等规范的验证点,包括对比度、键盘可操作性、ARIA 与屏幕阅读器支持等无障碍检查。触发词包括 a11y、无障碍、WCAG、EAA、ARIA、对比度、键盘、屏幕阅读器。
介绍来源: third_party · softspark · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 减记
- 实测状态
- 未测试
文件浏览
Frontmatter
name: a11y-validate
description: "Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen reader."
user-invocable: true
effort: medium
disable-model-invocation: true
context: fork
agent: frontend-specialist
argument-hint: "[path] [--scope full|keyboard|contrast|forms|media|aria|motion|mobile|docs] [--standard wcag-2.1-aa|wcag-2.2-aa|en-301-549|eaa] [--severity high|warn|info] [--framework auto|react|next|nuxt|astro|gatsby|sveltekit|remix|angular|vue|react-native|flutter|static] [--output markdown|json]"
allowed-tools: Read, Grep, Glob, Bash/a11y-validate — Accessibility & EAA Compliance Scanner
$ARGUMENTS
Scan a codebase for accessibility issues using pattern-matching heuristics. Detects violations of WCAG 2.1 Level AA, EN 301 549 (the EU harmonized accessibility standard), and the European Accessibility Act (Directive (EU) 2019/882, "EAA", in force since 28 June 2025). Read-only — never modifies files.
Complements /seo-validate (which only covers SEO-a11y overlap shallowly). Use this skill when the concern is legal accessibility compliance, not search engine ranking.
Standards basis:
- WCAG 2.1 Level A + AA — W3C Recommendation 2018 (updated 2023).
- WCAG 2.2 Level AA (opt-in via
--standard wcag-2.2-aa) — adds 2.4.11 focus not obscured, 2.5.8 target size minimum, 3.2.6 consistent help, 3.3.7 redundant entry, 3.3.8 accessible authentication. - EN 301 549 v3.2.1 — EU harmonized standard; aligned with WCAG 2.1 AA plus additional chapters for mobile, hardware, ICT procurement, authoring tools, and functional-performance statements.
- EAA / Directive (EU) 2019/882 — legal framework requiring EN 301 549 conformance for consumer-facing digital products and services in EU markets. Deadline: 28 June 2025. Requires accessibility statements per member-state templates.
Usage
/a11y-validate # Scan full project, auto-detect framework
/a11y-validate src/ # Scan specific path
/a11y-validate --scope keyboard # Only keyboard + focus checks
/a11y-validate --scope media # Only captions/transcripts/autoplay
/a11y-validate --scope docs # Only EAA accessibility-statement check
/a11y-validate --scope mobile # Only React Native + Flutter patterns
/a11y-validate --standard eaa # Activate EAA documentation category
/a11y-validate --standard wcag-2.2-aa # Add WCAG 2.2 criteria
/a11y-validate --severity high # Filter to HIGH findings
/a11y-validate --framework react-native # Force framework
/a11y-validate --output json # Structured JSON for CI integration
Scopes:
full(default) — all 8 categorieskeyboard— Category 3 onlycontrast— Category 4 onlyforms— Category 5 onlymedia— Category 6 onlyaria— Category 7 onlymotion— Category 8 motion subsectionmobile— Category 8 mobile subsection (React Native / Flutter)docs— Category 8 EAA documentation subsection (fast "are we legally exposed?" scan)
Standards:
wcag-2.1-aa(default) — 50 Level A + AA success criteria.wcag-2.2-aa— adds 2.4.11, 2.5.8, 3.2.6, 3.3.7, 3.3.8.en-301-549— wcag-2.1-aa + mobile chapter + functional-performance statements.eaa— en-301-549 + accessibility-statement documentation requirement (activates Category 8 docs).
Severity filtering: --severity high shows only HIGH, --severity warn shows HIGH+WARN, --severity info shows all. Default: all.
What This Command Does
- Detect framework from
package.json,pubspec.yaml, and entry HTML. - Run the scanner script for a deterministic baseline over 13 WCAG success criteria.
- Extend the scan by hand using
Grep/Glob/Readagainst framework-aware patterns for everything the script does not cover. - Interpret findings with specific fixes tied to the detected framework.
- Report findings sorted by severity with WCAG / EN 301 549 citations.
Steps
Step 1: Detect Framework
Run detection before scanning. Same logic as /seo-validate plus mobile entries:
| Deps / files contain | Framework | Notes |
|---|---|---|
next |
next |
App Router uses metadata export |
nuxt |
nuxt |
useHead() / definePageMeta |
astro |
astro |
islands model; client:only affects a11y |
gatsby |
gatsby |
Head API + react-helmet |
@sveltejs/kit |
sveltekit |
<svelte:head> |
@remix-run/* |
remix |
MetaFunction |
@angular/core |
angular |
CDK a11y module expected |
vue (no nuxt) |
vue |
a11y plugins optional |
react + vite (no next/remix) |
react-spa |
— |
react-scripts |
cra |
— |
react-native |
react-native |
mobile — AccessibilityInfo API |
pubspec.yaml with Flutter SDK |
flutter |
mobile — Semantics() widget |
| no framework deps | static |
raw HTML |
Also detect a11y libraries: @react-aria/*, @reach/*, @angular/cdk/a11y, vue-a11y, svelte-a11y, react-axe, axe-core. Their presence is INFO.
Step 2: Run the Scanner Script
python3 ${CLAUDE_SKILL_DIR}/scripts/a11y-scanner.py [path] [--severity high|warn|info|all] [--output json|text]
Deterministic regex checks over 13 WCAG success criteria — images, headings, language, forms, keyboard, focus, colour contrast, media, ARIA and target size. No framework awareness and no heuristics: what it reports is real, what it misses is Step 3's job. Exit code is non-zero when HIGH findings exist.
Step 3: Extend the Scan by Hand
Read reference/scanner-categories.md in full,
then work every category in --scope with Grep + Read, skipping only the
success criteria Step 2 already reported. Patterns adapt to the detected framework.
The coverage table under Scanner Reference says which criteria Step 2 handles per category. Everything else in the category is yours.
Step 4: Interpret and Enrich
For each finding:
- Read the flagged file/lines to confirm the match.
- Add a framework-specific fix (e.g., "use
@react-aria/button" vs "addaria-label"). - Mark confidence —
definitivefor regex matches,heuristicfor co-occurrence / absence / target-size estimation. - Skip false positives when context shows the concern is addressed (e.g., aria-label set via intl translation key).
Step 5: Report
Present findings sorted by severity (HIGH → WARN → INFO), then file path. State which findings came from the script and which from the manual pass — a reader needs to know how much of the result is deterministic.
Scanner Reference
scripts/a11y-scanner.py gives a deterministic baseline over 13 WCAG success
criteria. Everything else in each category is a manual pass, and the full pattern
tables for it live in
reference/scanner-categories.md.
| # | Category | Covered by the script | Manual pass |
|---|---|---|---|
| 1 | Semantic Structure & Landmarks | 1.3.1, 3.1.1 | rest of the category |
| 2 | Text Alternatives & Non-Text Content | 1.1.1 | rest of the category |
| 3 | Keyboard & Focus | 2.1.1, 2.4.3, 2.4.7 | rest of the category |
| 4 | Color, Contrast & Visual Cues | 1.4.3 | rest of the category |
| 5 | Forms, Labels & Errors | 3.3.2 | rest of the category |
| 6 | Media (Audio, Video, Embeds) | 1.2.1, 1.2.2, 1.4.2 | rest of the category |
| 7 | ARIA, Live Regions & Dynamic Content | 4.1.2 | rest of the category |
| 8 | Motion, Target Size, Mobile & EAA Docs | 2.5.8 | rest of the category |
The script never covers a whole category. Treat its output as the floor, not the result: a run that reports only script findings has skipped most of WCAG 2.1 AA.
Output Format
## Accessibility Validation Report
### Summary
| Metric | Value |
|--------|-------|
| Standard | wcag-2.1-aa / wcag-2.2-aa / en-301-549 / eaa |
| Scope | full / keyboard / contrast / forms / media / aria / motion / mobile / docs |
| Framework detected | next / nuxt / astro / ... / react-native / flutter / static |
| Files scanned | N |
| Public routes scanned | N |
| Accessibility statement | found / not-found |
| Findings: HIGH | N |
| Findings: WARN | N |
| Findings: INFO | N |
### Findings
#### [HIGH] src/components/VideoPlayer.tsx:42
Category: Media
Confidence: definitive
Pattern: `<video>` without `<track kind="captions">`
WCAG: 1.2.2 (Captions — Prerecorded, Level AA)
EAA: Article 4 (product/service accessibility requirements)
Fix: Add `<track kind="captions" src="/captions/en.vtt" srclang="en" label="English" default>`. If captions are unavailable, provide a transcript link.
See: reference/wcag-2-1-aa.md#guideline-12-time-based-media
#### [HIGH] public/index.html:8
Category: Viewport & Zoom
Confidence: definitive
Pattern: `<meta name="viewport" content="..., user-scalable=no">`
WCAG: 1.4.4 (Resize Text, Level AA)
Fix: Remove `user-scalable=no` and `maximum-scale=1` from the viewport meta — users must be able to zoom to 200%.
See: reference/wcag-2-1-aa.md#144-resize-text
#### [HIGH] src/routes.tsx:15
Category: EAA Accessibility Documentation
Confidence: heuristic
Pattern: No `/accessibility` / `/accessibility-statement` route detected; footer contains no a11y link
Standard: EAA Article 14 (mandatory accessibility statement)
Fix: Publish an accessibility statement conforming to your member-state template. Link it from the footer of every public page. See reference/eaa-compliance.md for template structure.
Confidence values:
definitive— regex match against a known-bad pattern.heuristic— co-occurrence, absence, ordering, or derived inference (target size from CSS, contrast from hardcoded colors, ATF detection).
Exit codes (when --output json):
0— no HIGH findings.1— one or more HIGH findings.
Out of Scope (Static Analysis Cannot Detect)
The skill explicitly does NOT verify the following — pair with runtime tools:
- Actual contrast ratios under runtime CSS cascade, theme switching, custom properties (use
axe-core, Lighthouse, or manual tooling). - Zoom / reflow behavior at 200% / 400% (WCAG 1.4.10, 1.4.4) — requires rendering.
- Screen reader announcement order and quality (NVDA, JAWS, VoiceOver, TalkBack).
- Cognitive accessibility (WCAG 3.x is mostly process/content-driven, not pattern-matchable).
- Actual keyboard trap behavior — requires interaction.
- Pronunciation / lang switches at runtime.
- Real-time caption accuracy.
- Usability / comprehension — requires user studies.
For these, use: axe-core, pa11y, Lighthouse accessibility audit, manual assistive-tech testing, and user research with disabled participants.
Rules
- Read-only: Never modify any files.
- Framework-aware: Detect framework first; apply correct pattern set.
- Standards citation: Every HIGH/WARN finding cites a WCAG success criterion (e.g., "1.3.1") or EN 301 549 clause.
- Skip non-source files: Binary files, lock files, vendored directories (
node_modules/,vendor/,dist/,build/,.next/,.nuxt/,.svelte-kit/,ios/Pods/,android/build/,.dart_tool/). - No false confidence: Label heuristic findings clearly. Color contrast and target size are ALWAYS heuristic in static analysis.
- EAA docs category is LEGAL risk: Missing accessibility statement when
--standard eaais selected is HIGH — this is a regulatory finding, not a code-quality suggestion. - No auto-fix: A11y fixes often require design/content decisions that exceed pattern matching.
- Don't flag missing ARIA when native semantics suffice: Prefer native HTML elements; flag redundant ARIA, not absence when the native element is already there.
Gotchas
scripts/a11y-scanner.pyexits 1 when it finds HIGH findings, which is success for this skill, not failure. A wrapper that treats non-zero as an error will report a clean scan on the codebase with the most problems.- The script covers 13 success criteria;
reference/wcag-2-1-aa.mddocuments ~50. Reporting only script output looks like a full WCAG 2.1 AA pass and is not one — Step 3 is where most of the standard actually gets checked. - Colour contrast is computed from hardcoded hex values in source. A theme built on CSS custom properties,
oklch(), or a design-token pipeline yields no matches at all, and "no contrast findings" then means "nothing was measurable", not "contrast is fine". alt=""is correct for decorative images and wrong for meaningful ones. The scanner cannot see which is which — it flags missingalt, not uselessalt, so a codebase that blanket-addedalt=""scans clean while being less accessible than one that omitted the attribute.- React Native and Flutter have no DOM. Categories written around HTML elements (landmarks, heading order,
lang) do not transfer; usereference/mobile-eaa.mdinstead of reporting the whole category as passing. --standard eaafindings are legal risk with a June 2025 deadline, not code-quality suggestions. Downgrading a missing accessibility statement to WARN because it "isn't a code problem" misreports regulatory exposure.
When NOT to Use
- To prove WCAG conformance for an audit or a VPAT — this is static analysis; conformance needs assistive-tech testing with disabled participants.
- To check contrast in a themed or token-driven design system — run
axe-coreor Lighthouse against the rendered page instead. - For a runtime-only concern (focus traps, screen-reader announcement order, zoom reflow at 200%/400%) — see Out of Scope.
- For the a11y subset that affects search ranking — use
/seo-validate, category 9. - To fix what was found — this skill is read-only by contract; fixes usually need design and content decisions.
Reference Documents
- reference/wcag-2-1-aa.md — All 50 Level A + AA success criteria with detection status (statically detectable vs runtime-only).
- reference/wcag-2-2-aa.md — 9 new WCAG 2.2 success criteria (2.4.11, 2.4.12, 2.4.13, 2.5.7, 2.5.8, 3.2.6, 3.3.7, 3.3.8, 3.3.9) with failure patterns, grep patterns, and framework notes.
- reference/eaa-compliance.md — EU Directive 2019/882 articles, EN 301 549 v3.2.1 mapping, 28 June 2025 timeline, member-state transposition deltas, accessibility-statement templates.
- reference/aria-patterns.md — ARIA 1.2 Authoring Practices: landmarks, roles, states/properties, common anti-patterns, framework-specific helpers (
@react-aria,@angular/cdk/a11y). - reference/mobile-eaa.md — EN 301 549 mobile chapter + React Native
AccessibilityInfo/ FlutterSemantics()patterns.
Related Skills
/seo-validate— SEO scanner; Category 9 covers a11y-for-SEO overlap only. For deep a11y compliance use/a11y-validate./cve-scan— dependency vulnerability scanner./hipaa-validate— HIPAA compliance scanner (similar pattern).
版本历史
-
v6.2.0
GitHub ↗
原版更新说明
**Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.1.0...v6.2.0
-
v6.1.0
GitHub ↗
原版更新说明
**Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v6.0.0...v6.1.0
-
v6.0.0
GitHub ↗
原版更新说明
## What's Changed * chore: bump softprops/action-gh-release from 3.0.3 to 3.0.4 by @dependabot[bot] in https://github.com/softspark/ai-toolkit/pull/45 * fix: handle Windows status output and clarify Antigravity workflow support by @softspark in https://github.com/softspark/ai-toolkit/pull/46 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.5.0...v6.0.0
-
v5.5.0
GitHub ↗
原版更新说明
### Ecosystem - **OpenCode V2 and V1 compatibility:** `scripts/generate_opencode_plugin.py` emits the documented `id/setup/server` contract for V2 and V1 **1.18.29+**. Upgrade older V1 clients before using this plugin, then run `ai-toolkit update` to regenerate managed copies. `doctor` warns about obsolete V1-only exports. Scoped global/project IDs avoid native collisions; advisory work has one owner per location, while safety guards execute in every registered layer. The current V2 package is `@opencode/cli`; `opencode-ai` still publishes V1. - **Claude guard failure policy:** destructive-command, home-path and configuration guards use `onFailure: block` on Claude Code **2.1.295+**. Legacy entries migrate without duplication; hooks owned by other plugins survive. Older clients do not have this infrastructure-failure guarantee. - **Codex, Gemini and Devin:** Codex refresh accepts the two diagnostic model-request events. Gemini advisory hooks return native JSON and save native completion responses; Devin prompt/edit hooks emit event-labelled context. - **All 13 integrations reviewed:** refresh release metadata and the ecosystem snapshot, distinguish stable/preview channels, and pin Auggie's stable v0 references. User model, effort and approval selections remain unchanged. ### Fixed - **One Claude Stop checker:** remove the duplicate advisory handler from the global and app manifests. `quality-gate.sh` keeps PHPStan advisory through `quality-check.sh --php-only`, preserving checker precedence and Makefile settings. PHPStan now runs synchronously on Stop and TaskCompleted (#43). - **OpenCode guard execution:** replace the unsupported Bun stdin path with real subprocess execution in both APIs. Denial, missing guards, crashes and timeouts block tools. Transactional generation refuses user-owned collisions and symlinked destinations; lifecycle cleanup releases advisory ownership. - **Isolated release smoke:** `scripts/release.sh` installs the packed artifact in a disposable, network-disabled container with no mounts and the OS user's default home. Host settings are not used as a smoke sandbox. ### Changed - Hook entries: 29 to 28 across the same 14 Claude events. Skills remain 116 and agents remain 44. Bats coverage grows from 2012 to 2037 tests. - Refresh compatibility documentation and remove stale inventory counts from the backward-compatibility policy. All protected public surfaces remain. - Skill body budget is unchanged: the largest body remains `design-engineering` at 17,197 bytes, less than 2,000 bytes below the 18,000-byte warning threshold, so the release ratchet does not apply. **Included pull request:** [#43: run the project checker once on Claude Code Stop](https://github.com/softspark/ai-toolkit/pull/43), contributed by @jacekprzybyl. **Full changelog:** https://github.com/softspark/ai-toolkit/compare/v5.4.2...v5.5.0
-
v5.4.2
GitHub ↗
原版更新说明
## What's Changed * fix(install): read state.json on native Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/39 * test: isolate USERPROFILE together with HOME on Windows by @jacekprzybyl in https://github.com/softspark/ai-toolkit/pull/41 **Full Changelog**: https://github.com/softspark/ai-toolkit/compare/v5.4.1...v5.4.2
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供 WCAG 2.1/2.2 AA、EN 301 549、EAA 合规扫描,解决法律合规刚需
- 支持多框架检测(React、Next、Flutter 等)与细粒度 scope 控制
- EAA 文档类别识别缺失 accessibility statement 为 HIGH 风险,精准反映监管暴露
亮点
- 触发词覆盖全面(a11y、WCAG、EAA、ARIA、对比度等),边界清晰
- description 位置正确且内容完整,无截断或错位
亮点
- 五步执行流程清晰(框架检测→脚本扫描→手动扩展→解释→报告)
- 含端到端示例与输出格式说明,frontmatter 完整
亮点
- 工具来源明确(a11y-scanner.py),参数定义清晰
- exit code 语义正确(HIGH 发现时 exit 1),read-only 安全设计
- 明确标注 heuristic 与 definitive 置信度,避免误判
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。