跳到正文
cccskills
免费在 GitHub 公开

accessibility-engineer

Apply semantic HTML/JSX and WAI-ARIA correctly and minimally. Apply when implementing any UI, especially forms, interactive components, or when accessibility is mentioned.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md4.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Accessibility Engineer Skill

When to Apply

Apply this skill when the request involves:

  • Accessibility, a11y, WAI-ARIA, screen reader support, semantic HTML, keyboard navigation, focus management
  • アクセシビリティ対応、WAI-ARIA、スクリーンリーダー対応、セマンティックHTML、キーボード操作、フォーカス管理
  • Any UI implementation (should be applied alongside other skills)

Core Principles (Most Important)

  • Native elements first. Solve with proper HTML elements (button, a, label, input, etc.) before reaching for ARIA.
  • ARIA is minimal. Don't add role/aria-* to make things "seem" accessible. Only add when there's a real requirement.
  • Operable = Communicable. Not just visually—assistive tech must receive state, name, and purpose. This is the Definition of Done.
  • Keyboard is the baseline. Mouse-only UI is incomplete. Design focus movement and operations first.

Implementation Rules

1) Semantic Structure

  • Maintain heading order (h1 → h2 → ...). Don't skip levels for styling.
  • Create landmarks for main regions (header, nav, main, footer, aside if needed).
  • Use ul/ol/li for lists, dl/dt/dd for definitions—not div substitutes.

2) Accessible Names

  • Buttons, links, inputs need "names" (labels read by screen readers).
    • Priority: Visible text
    • Fallback: aria-label (when visible text isn't possible)
    • Composition: aria-labelledby (referencing existing elements)
  • Icon-only buttons/links MUST have names (e.g., "Search", "Close").

3) Forms (Required)

  • Associate label with input (for/id). Never use placeholder as the only label.
  • Communicate required/optional, errors, hints machine-readably (e.g., aria-describedby for helper text).
  • Errors must explain: what's wrong, why, and how to fix.

4) States and Announcements (Dynamic UI)

  • Use native disabled attribute first (button disabled, etc.).
  • For toggles, use aria-pressed / aria-expanded only when native elements aren't sufficient.
  • Use aria-live for async completion/failure announcements—but don't overuse.

5) Keyboard Operation and Focus

  • Design DOM order so tab sequence is logical. Don't force reorder with tabindex.
  • tabindex="0": minimal use to make something focusable.
  • tabindex="-1": only for programmatic focus movement.
  • Always preserve visible focus (focus-visible). Never hide it.
  • Dialogs/modals: define focus destination on open and return destination on close. Implement focus trap if needed.

6) Images and Media

  • Use alt based on purpose (decorative images get empty alt="").
  • For video/audio: confirm controls (play/stop) and alternatives (captions/transcript). Ask if unclear.

Anti-Patterns (Never Do This)

  • div with onClick acting as button (breaks keyboard/role).
  • Using role="button" as a workaround (use native button).
  • Adding aria-label everywhere (causes duplicate announcements when visible label exists).
  • Removing focus ring (invisible focus = inoperable).

Clarification Questions (Don't Assume)

  • Must this UI be completable with keyboard only? (If yes, enumerate operation steps and agree.)
  • For modal/drawer: what gets focus on open? What gets focus on close?
  • When are errors announced? Immediately? After submit?
  • Does video/audio need captions or text alternatives?

Output Format (For Implementation)

  1. Semantic structure (landmarks, headings, lists)
  2. Keyboard operation (Tab order, Enter, Space, Escape)
  3. ARIA usage (only where needed, with justification)
  4. States (disabled/loading/error) and announcements (aria-live if needed)
  5. Accessibility checklist self-assessment (OK / needs work)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Translate motion, interaction, and visual experience into implementable constraints while preserving accessibility and performance. Apply when working on animations, transitions, scroll effects, or micro-UX.

中文简介正在准备中。当前显示原文说明。

mae616/design-skills112026年1月30日 更新

Translate designs and UI requirements into robust, extensible implementations. Apply when converting designs to code, implementing components, fixing broken UI, or handling responsive layouts.

中文简介正在准备中。当前显示原文说明。

mae616/design-skills112026年1月30日 更新

Design UI as information architecture + interaction + visual tone, then translate into implementable specs. Apply when discussing screen design, component design, design systems, or visual hierarchy.

中文简介正在准备中。当前显示原文说明。

mae616/design-skills112026年1月30日 更新

Evaluate UI/flows from cognitive load, error prevention, and accessibility perspectives. Apply when reviewing UX, discussing user confusion, high drop-off, or form usability issues.

中文简介正在准备中。当前显示原文说明。

mae616/design-skills112026年1月30日 更新

查看 mae616 的全部技能

报告此技能的问题