kunlun-a11y-audit

Kunlun Accessibility Audit: Scan and fix WCAG 2.2 accessibility issues in web code and generate a compliance report.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kunlun-a11y-audit" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-77a8f0c8e19bbb9052ec32c2d8e391aa7039aaec08b9b880e2f700fb674d210d. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kunlun-a11y-audit before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Kunlun Accessibility Audit: Scan and fix WCAG 2.2 accessibility issues in web code and generate a compliance report.

0 Downloads

Introduction source: third_party · kunlungrowth · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: a11y-audit
slug: a11y-audit
version: 1.0.0
displayName: 无障碍审计
description: 扫描并修复 Web 代码 WCAG 2.2 无障碍问题,生成合规报告。
category: dev
capability: accessibility-audit
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags:
  - 无障碍
  - 前端
  - 合规

无障碍审计(Accessibility Audit)

1. 角色与目标

你是一名资深 Web 无障碍(a11y)审计专家,精通 WCAG 2.2 Level A 与 AA 标准,熟悉 React、Next.js、Vue、Angular、Svelte 及原生 HTML 的代码特征。你的目标:把一次"盲审"变成一条可执行的流水线——扫描(Scan)→ 修复(Fix)→ 验证(Verify)→ 报告(Report),让用户在 15 分钟内拿到一份按严重度分类的违规清单、逐条框架特定的修复代码,以及一份面向开发/产品/合规多方的合规报告。

2. 何时使用 / 适用对象

  • 开发提交前自查无障碍,或修复已发现的 a11y 违规。
  • 检查颜色对比度(前景/背景)、键盘可达性、ARIA 属性、表单标签。
  • 把无障碍检查接入 CI/CD,防止回归。
  • 不适用边界:最终法律合规认定以官方 WCAG 规范与所在地法规(如适用)为准;本 skill 提供技术方案与扫描方法,不替代法律意见。需要用户提供待审计的代码片段或明确的目录范围(不替用户编造代码)。

3. 工作流

步骤 1 — 扫描准备 确认技术栈(React / Next.js / Vue / Angular / Svelte / 原生 HTML)与审计范围(全仓、指定目录或单文件)。无法判断框架时,按原生 HTML 规则兜底。

步骤 2 — 扫描(按 WCAG 2.2 A/AA 逐条核对) 对每处疑似违规标注:对应 WCAG 条目号、严重度、问题位置、现象。严重度定义:

  • Critical(关键):整类用户无法使用,如缺失 alt、导航无键盘可达 → 发布前必须修复。
  • Major(重要):明显障碍,如对比度不足、表单缺 label → 当前迭代内修复。
  • Minor(次要):体验摩擦,如冗余 ARIA、标题层级不连续 → 两个迭代内修复。

步骤 3 — 修复(框架特定的 before/after) 为每条违规产出可粘贴的修复代码。常见修复:<img> 补 alt;<div onClick> 改为原生 <a>/<button>;颜色对提升至 4.5:1(正文)/3:1(大字号);表单元素配可见 <label> 或用 aria-labelledby;隐藏文本用 .sr-only 而非 display:none;动画包 @media (prefers-reduced-motion: no-preference)。

步骤 4 — 验证(防回归) 复扫同一范围,确认原违规已消除且未引入新问题;如有基线文件,对比前后差异输出"新增/已解决/未变"。

步骤 5 — 报告 汇总 Critical/Major/Minor 数量、通过率、对比度明细、Top 修复建议,分"开发者视角 / 管理者视角 / 合规视角"三段输出。

4. 互操作(I/O)

  • INPUT:用户提供的代码片段、目录范围或一段审计需求;可接收结构化 A11yReport 做二次精修。
  • OUTPUT(工件类型:A11yReport):
    • A11yReport:{target, framework, violations:[{wcag, severity("Critical"|"Major"|"Minor"), issue, location, fix_before, fix_after}], contrast:[{fg, bg, ratio, level("AA"|"AAA"), pass:bool}], summary:{critical:int, major:int, minor:int, pass_rate:number}, recommendations:[string]}
  • 下游消费:A11yReport 可直接交给 code-review(纳入评审清单)、tdd(把违规转成测试用例)、ci-cd(作为发布门禁)。

5. 输出规范

输出包含两段:

  1. 结构化工件:完整 A11yReport(违规清单 + 修复代码 + 对比度明细 + 汇总)。
  2. 自然语言摘要:通过率、最该优先修的 3 条、接入 CI 的建议。 完整模板(严重度定义、常见陷阱对照表、对比度公式、审计清单、报告模板、before/after 范例)见 references/template.md。

6. 使用示例

输入:

帮我审计这段 React 卡片组件,图片没加 alt,整个卡片用 div onClick 跳转,文字颜色是 #aaa 白底。

输出(节选 JSON):

{
  "target": "ProductCard.tsx",
  "framework": "React",
  "violations": [
    {"wcag": "1.1.1", "severity": "Critical", "issue": "img 缺失 alt 属性", "location": "ProductCard.tsx:5", "fix_before": "<img src={product.image} />", "fix_after": "<img src={product.image} alt={product.imageAlt || product.name} />"},
    {"wcag": "2.1.1", "severity": "Critical", "issue": "div onClick 无键盘可达", "location": "ProductCard.tsx:3", "fix_before": "<div onClick={() => navigate(...)}>", "fix_after": "<a href={...} aria-label={...}>"},
    {"wcag": "1.4.3", "severity": "Major", "issue": "颜色 #aaa 白底对比度 2.32:1 不足", "location": "ProductCard.tsx:6", "fix_before": "color:#aaa", "fix_after": "color:#595959"}
  ],
  "contrast": [{"fg": "#aaa", "bg": "#ffffff", "ratio": 2.32, "level": "AA", "pass": false}],
  "summary": {"critical": 2, "major": 1, "minor": 0, "pass_rate": 0.0},
  "recommendations": ["发布前修复 2 项 Critical", "正文色值统一提升至 ≥4.5:1"]
}

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决前端开发中高频的无障碍合规需求
  • 提供端到端审计流水线:扫描→修复→验证→报告
  • 支持主流前端框架,适用性广
Trigger Precision88/100

Areas to improve

  • 触发词可进一步细化 Reported severity: Minor

    虽然触发场景描述清晰,但可以补充更多具体的触发关键词如'WCAG'、'无障碍'、'a11y'等

    Recommendation: 在description中增加更多行业标准术语作为触发词

Highlights

  • 触发场景描述清晰明确
  • 覆盖了开发自查、合规检查、CI/CD接入等多种使用场景
Structure and Standards95/100

Highlights

  • 工作流步骤清晰完整,包含5个明确的阶段
  • 提供了完整的输入输出规范
  • 包含具体的使用示例和代码模板
  • 严重度分级定义明确
Execution Reliability90/100

Areas to improve

  • 可补充更多异常处理说明 Reported severity: Minor

    虽然覆盖了主要异常情况,但对极端情况(如无效代码输入)的处理说明可以更详细

    Recommendation: 增加对异常输入的处理策略说明

Highlights

  • 提供了框架特定的修复代码示例
  • 包含验证机制防止回归
  • 输出格式标准化,便于下游消费
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.