跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

awesome-accessibility-audit

Read-only WCAG audit of UI and markup with a concrete fix per finding. Use when asked to check accessibility, a11y, keyboard or screen-reader support, or contrast.

Khasky · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add khasky/awesome-agent-skills --skill awesome-accessibility-audit

技能说明


name: awesome-accessibility-audit description: "Read-only WCAG audit of UI and markup with a concrete fix per finding. Use when asked to check accessibility, a11y, keyboard or screen-reader support, or contrast." license: MIT metadata: author: Khasky tags: ["accessibility", "a11y", "wcag", "audit", "frontend"] documentation: "https://github.com/khasky/awesome-agent-skills/tree/main/skills/awesome-accessibility-audit"

Accessibility Audit

Review UI and markup for accessibility and give the concrete fix for each finding, aligned with WCAG, so all users can perceive, operate, and understand the interface.

Read-only: it reports findings, each with the markup or attribute change that resolves it, and never applies them. A snippet in a report is reviewable next to the criterion it satisfies; the same edit applied silently is not. Hand the report to whoever owns the component.

When to Activate

  • User asks for "accessibility", "a11y", "WCAG", or "screen reader support"
  • Before shipping a new page or component
  • Reviewing forms, modals, or interactive UI
  • After a design or UI change that affects interaction or content

Work Process

  1. Define scope — Page, component, or flow to review (e.g. login form, report table, modal dialog).
  2. Check each area — Semantic HTML, keyboard, labels and names, color and contrast, dynamic content, motion. Use the checklists below.
  3. Document findings — Location (component/file or element type), WCAG criterion or principle, issue, impact, and recommended fix. Severity: Critical / High / Medium.
  4. Give the fix, do not apply it — A code snippet or attribute change in the report where possible. Prefer native HTML and correct ARIA over custom widgets when they suffice.
  5. Recommend follow-up — Suggest automated tools (e.g. axe, Lighthouse, pa11y; in CI, fail the build on critical) and manual testing for broader coverage. Automated tools catch roughly 30–40% of WCAG issues — the rest is manual. Recommend a flow × assistive-tech matrix: test each key user flow across keyboard-only, a screen reader (VoiceOver on Mac/iOS, NVDA on Windows, TalkBack on Android), 200% and 400% zoom / reflow (WCAG 1.4.10), Windows High Contrast, and reduced-motion; note Voice Control/Dragon and Switch Control where relevant. Do not claim full WCAG compliance from a single review.
    • For automated assertions in tests: axe-core with .withTags(['wcag2a','wcag2aa']) targets a specific WCAG tier and can fail CI on violations; Playwright's page.ariaSnapshot() (1.59+) asserts the accessibility tree of dialogs, menus, and composite widgets — coverage beyond what axe/Lighthouse give.
    • Run automated scans at more than one viewport (mobile and desktop breakpoints, not only the default): focus-obscured, overlapping targets, and reflow violations appear or vanish with viewport size, so a single-viewport scan silently under-reports.

Done when: the scope is stated, every checklist area below has been walked, each finding carries its location, its WCAG criterion and its fix, and whatever only a screen reader or a second viewport could settle is named as untested rather than assumed.

Focus Areas and Checklist

1. Semantic HTML and structure

  • One <h1> per page; heading levels in order (no skipping 2 → 4).
  • Skip link to main content as the first focusable element (WCAG 2.4.1 Bypass Blocks).
  • Viewport meta does not disable zoom: flag user-scalable=no and maximum-scale=1 (WCAG 1.4.4).
  • Every page has a <title> that describes its topic or purpose, and it changes on SPA route changes (2.4.2 Page Titled, A).
  • Page language is set with lang on <html> (3.1.1, A); passages in another language carry their own lang (3.1.2 Language of Parts, AA).
  • Content is not locked to one orientation (a CSS or manifest orientation lock) unless the orientation is essential (1.3.4 Orientation, AA).
  • Reflow: at 320 CSS px wide (400% zoom of a 1280px viewport) content needs no two-dimensional scrolling, except for data tables, maps, and similar content that needs both (1.4.10, AA).
  • Text spacing: with line height 1.5, paragraph spacing 2x, letter spacing 0.12em and word spacing 0.16em applied, nothing clips, overlaps, or disappears; flag fixed-height text containers and overflow: hidden on text (1.4.12, AA).
  • Landmarks: <main>, <nav>, <aside>, <footer> where appropriate.
  • Lists use <ul>/<ol>/<li>; tables use <th>, scope, and caption if applicable.
  • Buttons are <button> or <input type="submit">; links are <a href="...">. Do not use <div onclick> for actions without role, keyboard, and focus.
  • Form controls have correct type and grouping (<fieldset>, <legend> for groups).

2. Keyboard

  • All interactive elements are focusable (no tabindex="-1" on buttons/links unless managed for modal).
  • Focus order is logical (matches visual order or is explicitly managed).
  • Visible focus indicator (outline or custom style); not removed with outline: none without replacement. Prefer :focus-visible (no ring on mouse click) and :focus-within for compound controls.
  • No keyboard trap: user can tab out of modals and menus; Escape closes where expected.
  • Custom widgets (tabs, accordions, menus) operable with keyboard (Enter/Space to activate, Arrow keys if applicable).
  • Content shown on hover or focus (tooltips, popovers, submenus) is dismissible without moving the pointer (Escape), hoverable (the pointer can move onto it without it vanishing), and persistent until dismissed or no longer relevant (1.4.13, AA). A feature reachable only by hover has a keyboard and touch path.

3. Labels and names

  • Every form input has a visible <label> or aria-label; labels are associated (e.g. for/id or wrapping).
  • Inputs carry correct type/inputmode and autocomplete attributes (WCAG 1.3.5 Identify Input Purpose).
  • Form errors appear inline next to the
阅读完整来源 ↗