Token导航 LogoToken导航

Agent Skill · 前端设计

wcag-audit-patterns(WCAG 审核模式)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

wcag-audit-patterns 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 159。

总安装 142,008周安装 6,070GitHub Stars 34,524下载 49,776核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:wcag-audit-patterns(WCAG 审核模式)
来源仓库:https://github.com/wshobson/agents
仓库路径:skills/wcag-audit-patterns
安装命令:
npx skills add https://github.com/wshobson/agents --skill wcag-audit-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/wshobson/agents --skill wcag-audit-patterns

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

自动化 WCAG 2.2 审核,包括违规检测、补救模式和合规性指导。

涵盖所有四个 WCAG 原则(可感知、可操作、可理解、稳健),以及 A、AA 和 AAA 级一致性的详细清单 包括常见违规行为的代码示例:缺少替代文本、对比度不足、键盘陷阱、表单标签和焦点管理 使用 axe-core、Playwright 和 CLI 工具以及手动验证策略提供自动化测试模式 提供针对常见问题的修复模板,例如颜色对比度修复、可访问的表单模式和自定义键盘可操作组件

来源仓库内路径:skills/wcag-audit-patterns

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wshobson/agents --skill wcag-audit-patterns;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

wcag-audit-patterns 怎么安装?

在终端执行 npx skills add https://github.com/wshobson/agents --skill wcag-audit-patterns。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

wcag-audit-patterns 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

wcag-audit-patterns 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

wcag-audit-patterns 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

wcag-audit-patterns 用的人多吗?

公开数据是累计安装 142,008 次,近一周安装 6,070 次,下载 49,776 次,GitHub 34,524 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

wcag-audit-patterns 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 来源仓库有 34,524 星,维护活跃度相对可查。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
wcag-audit-patterns

WCAG 审核模式 · 本页

142,00834,524操作浏览器MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

WCAG Audit Patterns

Comprehensive guide to auditing web content against WCAG 2.2 guidelines with actionable remediation strategies.

When to Use This Skill

  • Conducting accessibility audits
  • Fixing WCAG violations
  • Implementing accessible components
  • Preparing for accessibility lawsuits
  • Meeting ADA/Section 508 requirements
  • Achieving VPAT compliance

Core Concepts

1. WCAG Conformance Levels

LevelDescriptionRequired For
AMinimum accessibilityLegal baseline
AAStandard conformanceMost regulations
AAAEnhanced accessibilitySpecialized needs

2. POUR Principles

Perceivable:  Can users perceive the content?
Operable:     Can users operate the interface?
Understandable: Can users understand the content?
Robust:       Does it work with assistive tech?

3. Common Violations by Impact

Critical (Blockers):
├── Missing alt text for functional images
├── No keyboard access to interactive elements
├── Missing form labels
└── Auto-playing media without controls

Serious:
├── Insufficient color contrast
├── Missing skip links
├── Inaccessible custom widgets
└── Missing page titles

Moderate:
├── Missing language attribute
├── Unclear link text
├── Missing landmarks
└── Improper heading hierarchy

Audit Checklist

Perceivable (Principle 1)

## 1.1 Text Alternatives

### 1.1.1 Non-text Content (Level A)

- [ ] All images have alt text
- [ ] Decorative images have alt=""
- [ ] Complex images have long descriptions
- [ ] Icons with meaning have accessible names
- [ ] CAPTCHAs have alternatives

Check:

<!-- Good --> <img src="chart.png" alt="Sales increased 25% from Q1 to Q2" /> <img src="decorative-line.png" alt="" />

<!-- Bad --> <img src="chart.png" /> <img src="decorative-line.png" alt="decorative line" />

1.2 Time-based Media

1.2.1 Audio-only and Video-only (Level A)

  • Audio has text transcript
  • Video has audio description or transcript

1.2.2 Captions (Level A)

  • All video has synchronized captions
  • Captions are accurate and complete
  • Speaker identification included

1.2.3 Audio Description (Level A)

  • Video has audio description for visual content

1.3 Adaptable

1.3.1 Info and Relationships (Level A)

  • Headings use proper tags (h1-h6)
  • Lists use ul/ol/dl
  • Tables have headers
  • Form inputs have labels
  • ARIA landmarks present

Check:

<!-- Heading hierarchy -->
<h1>Page Title</h1>
<h2>Section</h2>
<h3>Subsection</h3>
<h2>Another Section</h2>

<!-- Table headers -->
<table>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Price</th>
    </tr>
  </thead>
</table>

1.3.2 Meaningful Sequence (Level A)

  • Reading order is logical
  • CSS positioning doesn't break order
  • Focus order matches visual order

1.3.3 Sensory Characteristics (Level A)

  • Instructions don't rely on shape/color alone
  • "Click the red button" → "Click Submit (red button)"

1.4 Distinguishable

1.4.1 Use of Color (Level A)

  • Color is not only means of conveying info
  • Links distinguishable without color
  • Error states not color-only

1.4.3 Contrast (Minimum) (Level AA)

  • Text: 4.5:1 contrast ratio
  • Large text (18pt+): 3:1 ratio
  • UI components: 3:1 ratio

Tools: WebAIM Contrast Checker, axe DevTools

1.4.4 Resize Text (Level AA)

  • Text resizes to 200% without loss
  • No horizontal scrolling at 320px
  • Content reflows properly

1.4.10 Reflow (Level AA)

  • Content reflows at 400% zoom
  • No two-dimensional scrolling
  • All content accessible at 320px width

1.4.11 Non-text Contrast (Level AA)

  • UI components have 3:1 contrast
  • Focus indicators visible
  • Graphical objects distinguishable

1.4.12 Text Spacing (Level AA)

  • No content loss with increased spacing
  • Line height 1.5x font size
  • Paragraph spacing 2x font size
  • Letter spacing 0.12x font size
  • Word spacing 0.16x font size
### Operable (Principle 2)

2.1 Keyboard Accessible

2.1.1 Keyboard (Level A)

  • [ ] All functionality keyboard accessible
  • [ ] No keyboard traps
  • [ ] Tab order is logical
  • [ ] Custom widgets are keyboard operable

Check:

// Custom button must be keyboard accessible
<div role="button" tabindex="0"
     onkeydown="if(event.key === 'Enter' || event.key === ' ') activate()">

2.1.2 No Keyboard Trap (Level A)

  • Focus can move away from all components
  • Modal dialogs trap focus correctly
  • Focus returns after modal closes

2.2 Enough Time

2.2.1 Timing Adjustable (Level A)

  • Session timeouts can be extended
  • User warned before timeout
  • Option to disable auto-refresh

2.2.2 Pause, Stop, Hide (Level A)

  • Moving content can be paused
  • Auto-updating content can be paused
  • Animations respect prefers-reduced-motion
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

2.3 Seizures and Physical Reactions

2.3.1 Three Flashes (Level A)

  • No content flashes more than 3 times/second
  • Flashing area is small (<25% viewport)

2.4 Navigable

2.4.1 Bypass Blocks (Level A)

  • Skip to main content link present
  • Landmark regions defined
  • Proper heading structure
<a href="#main" class="skip-link">Skip to main content</a>
<main id="main">...</main>

2.4.2 Page Titled (Level A)

  • Unique, descriptive page titles
  • Title reflects page content

2.4.3 Focus Order (Level A)

  • Focus order matches visual order
  • tabindex used correctly

2.4.4 Link Purpose (In Context) (Level A)

  • Links make sense out of context
  • No "click here" or "read more" alone
<!-- Bad -->
<a href="report.pdf">Click here</a>

<!-- Good -->
<a href="report.pdf">Download Q4 Sales Report (PDF)</a>

2.4.6 Headings and Labels (Level AA)

  • Headings describe content
  • Labels describe purpose

2.4.7 Focus Visible (Level AA)

  • Focus indicator visible on all elements
  • Custom focus styles meet contrast
:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

2.4.11 Focus Not Obscured (Level AA) - WCAG 2.2

  • Focused element not fully hidden
  • Sticky headers don't obscure focus
### Understandable (Principle 3)

3.1 Readable

3.1.1 Language of Page (Level A)

  • [ ] HTML lang attribute set
  • [ ] Language correct for content
<html lang="en">

3.1.2 Language of Parts (Level AA)

  • Language changes marked
<p>The French word <span lang="fr">bonjour</span> means hello.</p>

3.2 Predictable

3.2.1 On Focus (Level A)

  • No context change on focus alone
  • No unexpected popups on focus

3.2.2 On Input (Level A)

  • No automatic form submission
  • User warned before context change

3.2.3 Consistent Navigation (Level AA)

  • Navigation consistent across pages
  • Repeated components same order

3.2.4 Consistent Identification (Level AA)

  • Same functionality = same label
  • Icons used consistently

3.3 Input Assistance

3.3.1 Error Identification (Level A)

  • Errors clearly identified
  • Error message describes problem
  • Error linked to field
<input aria-describedby="email-error" aria-invalid="true" />
<span id="email-error" role="alert">Please enter valid email</span>

3.3.2 Labels or Instructions (Level A)

  • All inputs have visible labels
  • Required fields indicated
  • Format hints provided

3.3.3 Error Suggestion (Level AA)

  • Errors include correction suggestion
  • Suggestions are specific

3.3.4 Error Prevention (Level AA)

  • Legal/financial forms reversible
  • Data checked before submission
  • User can review before submit
### Robust (Principle 4)

4.1 Compatible

4.1.1 Parsing (Level A) - Obsolete in WCAG 2.2

  • [ ] Valid HTML (good practice)
  • [ ] No duplicate IDs
  • [ ] Complete start/end tags

4.1.2 Name, Role, Value (Level A)

  • [ ] Custom widgets have accessible names
  • [ ] ARIA roles correct
  • [ ] State changes announced
<!-- Accessible custom checkbox -->
<div role="checkbox"
     aria-checked="false"
     tabindex="0"
     aria-labelledby="label">
</div>
<span id="label">Accept terms</span>

4.1.3 Status Messages (Level AA)

  • Status updates announced
  • Live regions used correctly
<div role="status" aria-live="polite">3 items added to cart</div>

<div role="alert" aria-live="assertive">Error: Form submission failed</div>
## Automated Testing

// axe-core integration const axe = require('axe-core');

async function runAccessibilityAudit(page) { await page.addScriptTag({ path: require.resolve('axe-core') });

const results = await page.evaluate(async () => { return await axe.run(document, { runOnly: { type: 'tag', values: ['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa'] } }); });

return { violations: results.violations, passes: results.passes, incomplete: results.incomplete }; }

// Playwright test example test('should have no accessibility violations', async ({ page }) => { await page.goto('/'); const results = await runAccessibilityAudit(page);

expect(results.violations).toHaveLength(0); });

CLI tools

npx @axe-core/cli https://example.com npx pa11y https://example.com lighthouse https://example.com --only-categories=accessibility


## Remediation Patterns

### Fix: Missing Form Labels

<!-- Before --> <input type="email" placeholder="Email" />

<!-- After: Option 1 - Visible label --> <label for="email">Email address</label> <input id="email" type="email" />

<!-- After: Option 2 - aria-label --> <input type="email" aria-label="Email address" />

<!-- After: Option 3 - aria-labelledby --> <span id="email-label">Email</span> <input type="email" aria-labelledby="email-label" />


### Fix: Insufficient Color Contrast

/* Before: 2.5:1 contrast */ .text { color: #767676; }

/* After: 4.5:1 contrast */ .text { color: #595959; }

/* Or add background */ .text { color: #767676; background: #000; }


### Fix: Keyboard Navigation

// Make custom element keyboard accessible class AccessibleDropdown extends HTMLElement { connectedCallback() { this.setAttribute("tabindex", "0"); this.setAttribute("role", "combobox"); this.setAttribute("aria-expanded", "false");

this.addEventListener("keydown", (e) => { switch (e.key) { case "Enter": case " ": this.toggle(); e.preventDefault(); break; case "Escape": this.close(); break; case "ArrowDown": this.focusNext(); e.preventDefault(); break; case "ArrowUp": this.focusPrevious(); e.preventDefault(); break; } }); } }


## Best Practices

### Do's

- **Start early** - Accessibility from design phase
- **Test with real users** - Disabled users provide best feedback
- **Automate what you can** - 30-50% issues detectable
- **Use semantic HTML** - Reduces ARIA needs
- **Document patterns** - Build accessible component library

### Don'ts

- **Don't rely only on automated testing** - Manual testing required
- **Don't use ARIA as first solution** - Native HTML first
- **Don't hide focus outlines** - Keyboard users need them
- **Don't disable zoom** - Users need to resize
- **Don't use color alone** - Multiple indicators needed

平台分布

Cursor

27.36%
按下载量换算13,619

Claude Code

26.74%
按下载量换算13,310

OpenCode

19.31%
按下载量换算9,612

Gemini CLI

12.47%
按下载量换算6,207

Antigravity

8.13%
按下载量换算4,047

Codex

3.53%
按下载量换算1,757

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills