kodekateam/superior-skills

superior-accessibility

Review or implement interface accessibility for semantics, keyboard operation, focus, contrast, status communication, zoom, and assistive technology.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/kodekateam/superior-skills --skill superior-accessibility

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

Superior Accessibility

Preserve the user's ability to perceive, understand, navigate, and operate the changed interface. Prefer native semantics and observable behavior over ARIA-heavy patches.

Establish the affected journey, interaction model, supported platform, and available verification tools before choosing a fix. Preserve product behavior unless an inaccessible interaction contract must change.

Structure and names

  • Use the native element whose behavior matches the control.
  • Give controls an accessible name that matches or includes the visible label.
  • Keep heading order, landmarks, lists, tables, and form relationships meaningful.
  • Use alternative text for informative images; keep decorative imagery out of the accessibility tree.
  • Add ARIA only when native HTML cannot express the necessary relationship or state, and keep it synchronized.

Keyboard and focus

  • Make every essential action reachable and operable without a pointer.
  • Preserve a logical focus order that matches the reading and interaction sequence.
  • Show a visible focus indicator against every surface it crosses.
  • Move focus only for a real context change such as opening a modal; restore it when that context closes.
  • Ensure overlays trap focus when appropriate, close predictably, and do not leave background content interactive.

Contrast and non-color cues

Use scripts/contrast_check.py for known solid sRGB colors when Python is available:

text
python scripts/contrast_check.py "#1f2937" "#ffffff"

Resolve the script relative to this SKILL.md. For gradients, images, opacity, filters, or compositing, inspect the actual rendered result; two source hex values may not represent the final contrast.

  • Target at least 4.5:1 for normal text and 3:1 for large text under WCAG 2.x.
  • Check meaningful component boundaries and focus indicators against adjacent colors.
  • Pair color with text, iconography, shape, or another cue for status and validation.
  • Do not assume muted text is exempt because it is secondary.

Dynamic states

  • Expose validation errors near their fields and summarize them when the form needs it.
  • Announce important asynchronous results without repeatedly interrupting the user.
  • Keep loading, expanded, selected, pressed, checked, current, invalid, and disabled states programmatically accurate.
  • Do not disable an action without explaining the prerequisite when it is not otherwise obvious.

Read references/interaction-and-assistive-technology.md when the task includes dialogs, composite widgets, custom controls, drag and drop, live updates, route changes, virtualized content, or screen-reader-specific behavior.

Zoom, motion, and touch

  • Reflow at supported zoom without losing information or actions.
  • Keep focused inputs visible above virtual keyboards and fixed UI.
  • Provide comfortable touch targets and spacing.
  • Respect reduced-motion preferences and avoid motion that is required to understand the result.

Verify behavior

Use keyboard-only navigation through the changed journey. Inspect accessible names and states with available platform tools, test relevant zoom and narrow layouts, and check contrast at the rendered colors. Automated checks are useful coverage, not proof of usability; report both automated and manual evidence.

Do not claim screen-reader compatibility without naming the browser, assistive technology, platform, and journey actually exercised. When that environment is unavailable, verify semantics and accessibility-tree output where possible, then report the untested combination explicitly.

Use superior-code-review when accessibility is only one risk area in a broader change-set review, superior-responsive for space-driven re-composition, and superior-ui for visual or interaction implementation outside the accessibility contract.

来自同一仓库

更多 Skills

全部 Skills