design-qa
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill: Design QA
技能:Design QA
Stand up the automated + manual gates that stop quality from regressing.
建立自动化和手动门禁,防止质量回退。
Steps
步骤
- Read (the QA pyramid: token/lint gates → automated a11y → visual regression → manual a11y).
workflows/design-qa.md - Wire the fast gates first (every commit/PR): ,
python3 scripts/validate_tokens.py(batch WCAG over the token pairs), andpython3 scripts/validate_contrast.py(no raw hex/px/timing in component code). The repo'spython3 scripts/lint_hardcodes.py <src>runs these..github/workflows/ci.yml - Add automated a11y (axe-core / Pa11y) over each component's states (error/loading/disabled/expanded/selected), zero serious/critical to merge. Run the real-render contrast gate (and
node scripts/measure_render.mjs <file.html>) — it opens the page in headless Chromium, disables transitions, and measures the true computed-style + alpha-composited contrast of every text element (catches what static token checks miss).--dark - Add visual regression snapshots across variants × sizes × states × light/dark + key breakpoints + RTL; freeze animations + deterministic data.
- Sign off the manual a11y checklist per release (keyboard, screen reader, 400% reflow, 200% text-spacing, reduced-motion, forced-colors — ).
accessibility/*
- 读取 (QA金字塔:token/lint门禁 → 自动化a11y → 视觉回归 → 手动a11y)。
workflows/design-qa.md - 首先接入快速门禁(每次提交/PR):、
python3 scripts/validate_tokens.py(对token对进行批量WCAG检查)和python3 scripts/validate_contrast.py(组件代码中不允许原始hex/px/timing)。仓库的python3 scripts/lint_hardcodes.py <src>运行这些。.github/workflows/ci.yml - 为每个组件的状态(错误/加载/禁用/展开/选中)添加自动化a11y(axe-core / Pa11y),零严重/关键问题才能合并。运行真实渲染对比度门禁 (以及
node scripts/measure_render.mjs <file.html>)——它在无头Chromium中打开页面,禁用过渡效果,并测量每个文本元素的真实计算样式+alpha合成对比度(捕获静态token检查遗漏的问题)。--dark - 添加跨变体×尺寸×状态×亮/暗+关键断点+RTL的视觉回归快照;冻结动画+确定性数据。
- 每次发布时签署手动a11y检查表(键盘、屏幕阅读器、400%回流、200%文本间距、减少动效、强制颜色—— )。
accessibility/*
Verification (definition of done)
验证(完成定义)
- An unreviewed PR cannot introduce an unresolved token alias, a contrast failure, a raw hex/px, or an axe violation — a gate blocks each.
- Snapshots cover dark mode + RTL + the semantic-changing states, not just the happy path.
- Manual a11y checklist signed off for the release.
- 未审查的PR不能引入未解决的token别名、对比度失败、原始hex/px或axe违规——每个门禁都会阻止。
- 快照覆盖暗模式+RTL+语义变化状态,而不仅仅是快乐路径。
- 手动a11y检查表已为发布签署。