ui-a11y – skill Thiết kế & UI cho agent AI
Kiểm tra component hoặc trang để tìm lỗi khả năng truy cập (accessibility) và sửa chúng.
Cài skill ui-a11y bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/ui-a11y-0fddd.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /ui-a11y – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/ui-a11y-0fddd.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $ui-a11y – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/ui-a11y-0fddd.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /ui-a11y – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/ui-a11y-0fddd.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /ui-a11y – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Accessibility Audit
When to Use
Use this skill when you need audit a component or page for accessibility issues and fix them.
When NOT to use
- For general design system compliance review → use
/ss-review - For Nielsen UX heuristics → use
/ss-audit - For non-StyleSeed code (no
data-slot, no semantic tokens) — assumes StyleSeed conventions - For runtime testing — this is a static code audit, not a screen-reader simulation
Target: $ARGUMENTS
Audit Criteria
WCAG 2.2 AA Compliance
1. Perceivable
- Color contrast: Text must meet 4.5:1 (normal) or 3:1 (large/bold text)
- Check
text-muted-foreground(#717182) onbg-background(#FFFFFF) = 4.6:1 (passes) - Check
text-brandon white (verify contrast with your skin's brand color) - Flag any custom colors that don't meet ratio
- Non-text contrast: UI controls/graphics must meet 3:1
- Text alternatives: All
<img>needalt, icons needaria-labelwhen meaningful - Color independence: Don't convey info by color alone (add icons/text)
2. Operable
- Pointer targets: WCAG 2.2 AA SC 2.5.8 requires 24x24 CSS pixels or an applicable spacing/other exception. A 36px button is not automatically a failure.
- Prefer 44x44px (
min-h-11 min-w-11) as a usability target; SC 2.5.5 uses that size at AAA with exceptions. - Inspect the actual clickable area and adjacent targets, not only the visual icon dimensions. See [minimum](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum) and [enhanced](https://www.w3.org/WAI/WCAG22/Understanding/target-size-enhanced) criteria.
- Keyboard navigation: All interactive elements must be keyboard-accessible
- Tab order should be logical
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2- Motion: Animations must respect
prefers-reduced-motion
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
3. Understandable
- Labels: Form inputs must have visible labels or
aria-label - Error messages: Form errors must be programmatically associated (
aria-describedby) - Language:
<html lang="en">(or appropriate language code for your project)
4. Robust
- Semantic HTML: Use appropriate elements (
<button>,<nav>,<main>,<header>) - ARIA: Radix primitives can supply accessible behavior, but composition still needs verified names, state, focus and keyboard handling.
- Roles: Prefer native controls; a role alone does not implement keyboard interaction or accessible state.
Design System Token Reference
| Token | Minimum Contrast | Note |
|-------|-----------------|------|
| --foreground | 7:1+ | Body text — verify with your skin |
| --muted-foreground | 4.5:1+ | Secondary text — verify with your skin |
| --brand | 4.5:1+ | Accent — verify with your skin's brand color |
| --destructive | 4.5:1+ | Error — verify with your skin |
| --success | 3:1+ | Large text/icons only — verify with your skin |
| --warning | 4.5:1+ | Warning text — some skins need a darker variant |
Output
1. Issues found: List with severity (Critical/Major/Minor)
2. Auto-fixes: Apply fixes directly where possible
3. Manual review needed: Flag items that need human judgment
Example
User request:
> Audit a component or page for accessibility issues and fix them.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.
Skill liên quan
- ui-component – Tạo component UI mới theo quy ước thiết kế của StyleSeed.
- ui-from-screenshot – Chuyển ảnh chụp màn hình hoặc mockup thành giao diện tương ứng bằng chính các component…
- ui-lint – Lint tự động nhanh — phát hiện các vi phạm design system phổ biến chỉ trong vài giây.
- ui-motion – Áp dụng một chuyển động StyleSeed có tên cho component — hoặc một trong 5 seed tính cách…
- ui-page – Khởi tạo khung trang/màn hình mobile mới theo các pattern layout của StyleSeed.
- ui-pattern – Tạo pattern UI ghép sẵn (bố cục card, danh sách, khối form, grid, v.v.) từ các primitive…
- ui-review – Review code UI về mức tuân thủ design system, khả năng truy cập và các thực hành tốt nhất.
- ui-score – Chấm điểm chất lượng thiết kế của file UI theo thang 0-100 dựa trên ngôn ngữ thiết kế…