← 返回 Skills 市场
supermario11

Cuihua A11y Checker

作者 supermario11 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
211
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cuihua-a11y-checker
功能描述
♿ AI-powered accessibility (a11y) checker. Automatically detect WCAG violations, generate ARIA labels, test keyboard navigation, and ensure your app is acces...
使用说明 (SKILL.md)

cuihua-a11y-checker ♿

Build accessible apps for everyone

AI-powered accessibility assistant that ensures your app works for all users:

  • WCAG 2.1 compliance
  • 🎯 Auto-fix common issues
  • ⌨️ Keyboard navigation testing
  • 🎨 Color contrast validation
  • 📱 Screen reader optimization

Why Accessibility Matters

  • 🌍 15% of population has disabilities
  • ⚖️ Legal requirement in many countries
  • 📈 Better UX for everyone
  • 🔍 Better SEO (search engines love semantic HTML)

Quick Start

"Check accessibility of src/components"

Output:

♿ Accessibility Report
━━━━━━━━━━━━━━━━━━━━

Files scanned: 12
Issues found: 18

🔴 CRITICAL (3):
  - Missing alt text on images (5 instances)
  - Form inputs without labels (2 instances)
  - Insufficient color contrast (1 instance)

🟡 WARNINGS (8):
  - Missing ARIA labels on buttons
  - Non-semantic HTML elements
  - Missing skip navigation link

🟢 SUGGESTIONS (7):
  - Add landmarks (header, main, footer)
  - Improve heading hierarchy
  - Add focus indicators

Features

1. WCAG Compliance ✅

Check against WCAG 2.1 standards:

Level A (Must have):

  • Text alternatives for images
  • Keyboard accessibility
  • Color is not the only visual means
  • Labels or instructions for forms

Level AA (Should have):

  • Color contrast ratio ≥ 4.5:1
  • Resize text up to 200%
  • Multiple ways to navigate
  • Consistent navigation

Level AAA (Nice to have):

  • Color contrast ratio ≥ 7:1
  • Sign language for audio
  • Extended audio descriptions

2. Auto-fix Issues 🔧

Before:

\x3Cimg src="logo.png">
\x3Cbutton onclick="submit()">Click\x3C/button>
\x3Cdiv class="nav">...\x3C/div>

After:

\x3Cimg src="logo.png" alt="Company Logo">
\x3Cbutton onclick="submit()" aria-label="Submit form">Click\x3C/button>
\x3Cnav aria-label="Main navigation">...\x3C/nav>

3. Keyboard Navigation ⌨️

Test keyboard accessibility:

⌨️  Keyboard Navigation Test
━━━━━━━━━━━━━━━━━━━━━━━━

✅ Tab order is logical
❌ Focus indicator not visible
❌ Skip link missing
✅ All interactive elements reachable

Issues:
1. Add CSS for :focus state
2. Add skip navigation link
3. Ensure modal traps focus

4. Color Contrast 🎨

Validate color combinations:

🎨 Color Contrast Report
━━━━━━━━━━━━━━━━━━━━━

❌ FAIL: #777 on #fff
   Ratio: 4.47:1 (needs 4.5:1)
   Location: .text-muted class
   Fix: Use #767676 or darker

✅ PASS: #000 on #fff
   Ratio: 21:1

✅ PASS: #0066cc on #fff
   Ratio: 7.47:1

5. ARIA Labels 🏷️

Auto-generate semantic labels:

\x3C!-- Before -->
\x3Cbutton>\x3Ci class="icon-search">\x3C/i>\x3C/button>

\x3C!-- After -->
\x3Cbutton aria-label="Search">
  \x3Ci class="icon-search" aria-hidden="true">\x3C/i>
\x3C/button>

\x3C!-- Before -->
\x3Cdiv role="dialog">
  \x3Ch2>Confirm\x3C/h2>
  ...
\x3C/div>

\x3C!-- After -->
\x3Cdiv role="dialog" aria-labelledby="dialog-title" aria-modal="true">
  \x3Ch2 id="dialog-title">Confirm\x3C/h2>
  ...
\x3C/div>

6. Screen Reader Testing 📢

Simulate screen reader experience:

📢 Screen Reader Output
━━━━━━━━━━━━━━━━━━━━━

Navigation:
  "Navigation, landmark"
  "Home, link"
  "About, link"
  "Contact, link"

Main content:
  "Main, landmark"
  "Welcome to our site, heading level 1"
  "Get started today, heading level 2"
  "Sign up, button"

Issues:
  - Button at line 45 has no accessible name
  - Image at line 67 has no alt text

Usage Examples

Example 1: Component Audit

User: "Check accessibility of LoginForm component"

Agent:

♿ Accessibility Audit: LoginForm.jsx
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔴 CRITICAL ISSUES (2):

1. Form inputs missing labels (line 12-15)
   \x3Cinput type="email" name="email" />
   \x3Cinput type="password" name="password" />
   
   Fix: Add labels
   \x3Clabel htmlFor="email">Email\x3C/label>
   \x3Cinput type="email" id="email" name="email" />

2. Submit button has no accessible name (line 18)
   \x3Cbutton type="submit">\x3CIcon name="arrow" />\x3C/button>
   
   Fix: Add text or aria-label
   \x3Cbutton type="submit" aria-label="Sign in">
     \x3CIcon name="arrow" />
   \x3C/button>

🟡 WARNINGS (1):

1. No error announcements for screen readers
   
   Fix: Add aria-live region
   \x3Cdiv aria-live="polite" aria-atomic="true">
     {error && \x3Cp>{error}\x3C/p>}
   \x3C/div>

WCAG Level: Currently D (not compliant)
After fixes: Level AA ✅

Example 2: Color Contrast Fix

User: "Fix color contrast issues"

Agent:

🎨 Fixing color contrast...

Found 3 issues:

1. .text-muted (#777 on #fff)
   Current: 4.47:1 (FAIL)
   Fixed: #767676 (4.54:1) ✅

2. .btn-secondary (#999 on #fff)
   Current: 2.85:1 (FAIL)
   Fixed: #595959 (7.00:1) ✅

3. .link-subtle (#aaa on #fff)
   Current: 2.32:1 (FAIL)
   Fixed: #6c6c6c (4.50:1) ✅

Updated: styles.css
All contrasts now meet WCAG AA standard!

Example 3: Keyboard Navigation

User: "Test keyboard navigation"

Agent:

⌨️  Testing keyboard navigation...

✅ PASS: Tab order follows visual order
✅ PASS: All interactive elements focusable
❌ FAIL: Focus indicator not visible
❌ FAIL: Modal doesn't trap focus
✅ PASS: Escape key closes modal

Recommendations:

1. Add visible focus styles:
   *:focus {
     outline: 2px solid #0066cc;
     outline-offset: 2px;
   }

2. Implement focus trap in modal:
   useEffect(() => {
     const focusableElements = modal.querySelectorAll(
       'button, [href], input, select, textarea'
     );
     // Trap focus logic...
   }, []);

3. Add skip navigation link:
   \x3Ca href="#main" class="skip-link">
     Skip to main content
   \x3C/a>

Configuration

.a11yrc.json:

{
  "wcagLevel": "AA",
  "rules": {
    "colorContrast": "error",
    "altText": "error",
    "ariaLabels": "warn",
    "headingOrder": "warn",
    "landmarks": "warn"
  },
  "ignore": [
    "node_modules/**",
    "build/**"
  ],
  "autoFix": {
    "altText": true,
    "ariaLabels": true,
    "colorContrast": false
  }
}

Pricing

Free

  • ✅ Basic WCAG checks
  • ✅ Up to 10 components

Pro ($12/month)

  • ✅ Full WCAG 2.1 suite
  • ✅ Auto-fix suggestions
  • ✅ CI/CD integration

Enterprise ($99/month)

  • ✅ Custom rules
  • ✅ Compliance reports
  • ✅ Team training

Resources

License

MIT


Made with 🌸 by 翠花 (Cuihua)

Build apps that work for everyone.

安全使用建议
This skill appears coherent and implements a simple local accessibility scanner. It will read files under whatever path you give it (recurses directories and inspects .jsx/.tsx/.html files) and prints detected issues; it does not contact external services or require secrets. Before installing or invoking: (1) review the small a11y-checker.js if you want to verify behavior (source is included), (2) avoid pointing it at directories with sensitive proprietary or credential-bearing files if you don't want their filenames/snippets included in reports, and (3) if you plan to let the agent invoke skills autonomously, be aware the agent could be instructed to scan arbitrary paths — consider limiting invocation or reviewing outputs before sharing externally.
功能分析
Type: OpenClaw Skill Name: cuihua-a11y-checker Version: 1.0.0 The skill is a standard accessibility (a11y) auditing tool that performs static analysis on HTML, JSX, and TSX files using regular expressions. The implementation in a11y-checker.js is limited to basic checks for missing alt text, labels, and headings, and it lacks any network capabilities, shell execution, or data exfiltration logic. While SKILL.md describes advanced features like color contrast fixing that are not present in the provided Node.js code, these appear to be intended for the AI agent to perform manually or as part of a future implementation rather than as a vector for attack.
能力评估
Purpose & Capability
Name/description (WCAG checks, ARIA generation, keyboard and contrast testing) match the provided SKILL.md and the included a11y-checker.js, which implements file scanning and heuristic checks for images, buttons, forms, and headings.
Instruction Scope
SKILL.md instructs scanning project files (examples target src/components). The runtime code recursively reads directories and files, and only processes files with .jsx, .tsx or .html extensions — behaviour is within the stated purpose. The instructions do not ask for unrelated system credentials or external endpoints.
Install Mechanism
No install spec; the skill is instruction/code-only and requires the node binary. No remote downloads or package installs are specified.
Credentials
No environment variables, credentials, or config paths are required. The tool only reads local files it is pointed at; requested privileges are proportional to an on‑disk scanner.
Persistence & Privilege
always is false and the skill does not request permanent presence or modify other skills/system configuration. It performs local scanning only and does not persist global state.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cuihua-a11y-checker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cuihua-a11y-checker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
♿ WCAG 2.1 accessibility checker with auto-fix suggestions
元数据
Slug cuihua-a11y-checker
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cuihua A11y Checker 是什么?

♿ AI-powered accessibility (a11y) checker. Automatically detect WCAG violations, generate ARIA labels, test keyboard navigation, and ensure your app is acces... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 211 次。

如何安装 Cuihua A11y Checker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cuihua-a11y-checker」即可一键安装,无需额外配置。

Cuihua A11y Checker 是免费的吗?

是的,Cuihua A11y Checker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cuihua A11y Checker 支持哪些平台?

Cuihua A11y Checker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cuihua A11y Checker?

由 supermario11(@supermario11)开发并维护,当前版本 v1.0.0。

💬 留言讨论