design-qa

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill: Design QA

技能:Design QA

Stand up the automated + manual gates that stop quality from regressing.
建立自动化和手动门禁,防止质量回退。

Steps

步骤

  1. Read
    workflows/design-qa.md
    (the QA pyramid: token/lint gates → automated a11y → visual regression → manual a11y).
  2. Wire the fast gates first (every commit/PR):
    python3 scripts/validate_tokens.py
    ,
    python3 scripts/validate_contrast.py
    (batch WCAG over the token pairs), and
    python3 scripts/lint_hardcodes.py <src>
    (no raw hex/px/timing in component code). The repo's
    .github/workflows/ci.yml
    runs these.
  3. 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
    node scripts/measure_render.mjs <file.html>
    (and
    --dark
    ) — 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).
  4. Add visual regression snapshots across variants × sizes × states × light/dark + key breakpoints + RTL; freeze animations + deterministic data.
  5. Sign off the manual a11y checklist per release (keyboard, screen reader, 400% reflow, 200% text-spacing, reduced-motion, forced-colors —
    accessibility/*
    ).
  1. 读取
    workflows/design-qa.md
    (QA金字塔:token/lint门禁 → 自动化a11y → 视觉回归 → 手动a11y)。
  2. 首先接入快速门禁(每次提交/PR):
    python3 scripts/validate_tokens.py
    、
    python3 scripts/validate_contrast.py
    (对token对进行批量WCAG检查)和
    python3 scripts/lint_hardcodes.py <src>
    (组件代码中不允许原始hex/px/timing)。仓库的
    .github/workflows/ci.yml
    运行这些。
  3. 为每个组件的状态(错误/加载/禁用/展开/选中)添加自动化a11y(axe-core / Pa11y),零严重/关键问题才能合并。运行真实渲染对比度门禁
    node scripts/measure_render.mjs <file.html>
    (以及
    --dark
    )——它在无头Chromium中打开页面,禁用过渡效果,并测量每个文本元素的真实计算样式+alpha合成对比度(捕获静态token检查遗漏的问题)。
  4. 添加跨变体×尺寸×状态×亮/暗+关键断点+RTL的视觉回归快照;冻结动画+确定性数据。
  5. 每次发布时签署手动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检查表已为发布签署。