AgentSkillsCN

accessibility-contrast-audit

【设计系统】UI的定量可访问性审计——对比度比例、字体大小、点击目标、标题层次结构。当(1)检查WCAG颜色对比度合规性、(2)审计文本大小以确保可读性、(3)验证触摸/点击目标大小、(4)审查标题结构和地标、(5)用户要求‘检查可访问性’、‘审计对比度’、‘WCAG合规性’或‘a11y检查’时使用。

SKILL.md
--- frontmatter
name: accessibility-contrast-audit
description: "[Design System] Quantitative accessibility audit for UI - contrast ratios, font sizes, tap targets, heading hierarchy. Use when (1) checking WCAG color contrast compliance, (2) auditing text sizes for readability, (3) validating touch/click target sizes, (4) reviewing heading structure and landmarks, (5) user asks to 'check accessibility', 'audit contrast', 'WCAG compliance', or 'a11y check'."

Accessibility & Contrast Audit

Quantitative accessibility checks for contrast, font size, hit areas, and semantic structure.

Quick Start

bash
python3 scripts/audit_accessibility.py --source src/ --tokens tokens.json

WCAG Standards Reference

CriterionLevel AALevel AAA
Normal text contrast4.5:17:1
Large text contrast (18px+ or 14px bold)3:14.5:1
UI components/graphics3:13:1
Minimum touch target44×44px44×44px
Minimum font size (body)16px16px

Problem Types

TypeSeverityDescription
low-contrasterrorText/background contrast below WCAG threshold
text-too-smallwarningFont size below recommended minimum
hit-area-too-smallwarningTouch/click target below 44×44px
heading-skipwarningHeading levels skipped (h1→h3)
missing-alterrorImage missing alt text