Communitygithub.com

アクセシビリティ・オーディター

UIコンポーネントをWCAG準拠、ARIA属性、キーボードナビゲーション、スクリーンリーダー対応についてレビューします。フロントエンドコンポーネントの構築時や、アクセシビリティ改善が要求された際に使用します。

アクセシビリティ・オーディター とは?

Accessibility Auditorは、WebアプリケーションをWCAG 2.1 Level AAに準拠させるために、コードレビューと改善提案を行うAIエージェントスキルです。UIコンポーネントの構築時や、ユーザーからアクセシビリティ(a11y、WCAG、スクリーンリーダー、キーボードナビゲーション)に関するリクエストがあった際に有効活用できます。このスキルは、セマンティックHTMLの正しい使用、ARIA属性の適切な適用、キーボード操作のサポート、フォームラベルの設定、コントラスト比の確認、動的コンテンツの通知方法など、具体的な実装パターンをコード例付きで提供します。さらに、axe-coreやLighthouse、pa11yなどの自動テストツールの実行方法や、スクリーンリーダー専用テキストのCSSも含まれており、開発プロセス全体を通じてアクセシビリティを確保するための実践的なガイドラインを提供します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/crazydubya/accessibility-auditor

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

プレビュー

スキル README より

アクセシビリティ・オーディター preview
アクセシビリティ・オーディター preview
アクセシビリティ・オーディター preview

ドキュメント

アクセシビリティ・オーディター は何をしますか?

Webアプリケーションのアクセシビリティ準拠(WCAG 2.1 Level AA)を監査し、改善点を提案します。

使用すべきタイミング

  • UIコンポーネントの構築またはレビュー時
  • ユーザーからアクセシビリティ改善のリクエストがあった場合
  • アクセシビリティ監査の準備中
  • ユーザーが「アクセシビリティ」「a11y」「WCAG」「スクリーンリーダー」「キーボードナビゲーション」に言及した場合

指示

1. セマンティックHTMLの確認

適切なHTML要素を使用する:

<!-- 悪い例 -->
<div onclick="submit()">送信</div>

<!-- 良い例 -->
<button onclick="submit()">送信</button>

セマンティック構造:

  • <header>、<nav>、<main>、<footer>
  • <article>、<section>、<aside>
  • <h1> から <h6> を適切な階層で
  • アクションには<button>、ナビゲーションには<a>

2. ARIA属性

ARIAを使用すべき場合:

  • カスタムウィジェット(タブ、アコーディオン、モーダル)
  • 動的コンテンツの更新
  • 複雑なインタラクション
  • セマンティックHTMLだけでは不十分な場合

一般的なARIA属性:

<!-- ランドマークロール -->
<nav role="navigation" aria-label="メイン">

<!-- ウィジェットロール -->
<div role="button" tabindex="0" aria-pressed="false">

<!-- ライブリージョン -->
<div role="alert" aria-live="assertive">エラーが発生しました</div>

<!-- ラベルと説明 -->
<button aria-label="ダイアログを閉じる">×</button>
<input aria-describedby="password-help" />

ARIAの第一ルール: セマンティックHTMLで機能するならARIAを使わない

3. キーボードナビゲーション

すべてのインタラクティブ要素はキーボードで操作可能でなければならない:

// カスタム要素にキーボードサポートを追加
<div
  role="button"
  tabindex="0"
  onClick={handleClick}
  onKeyDown={(e) => {
    if (e.key === 'Enter' || e.key === ' ') {
      handleClick();
    }
  }}
>
  クリックしてください
</div>

タブオーダー:

  • カスタムインタラクティブ要素にはtabindex="0"を使用
  • tabindex > 0は避ける(混乱を招くタブオーダー)
  • プログラムによるフォーカス専用にtabindex="-1"を使用

フォーカス管理:

  • 可視のフォーカスインジケーター
  • モーダル内でフォーカスをトラップする
  • ダイアログを閉じる時にフォーカスを戻す
  • メインコンテンツへのスキップリンク

4. 代替テキストと画像

情報を伝える画像:

<img src="chart.png" alt="第3四半期の売上が25%増加" />

装飾的な画像:

<img src="decoration.png" alt="" />
<!-- または -->
<img src="decoration.png" role="presentation" />

複雑な画像:

<figure>
  <img src="complex-chart.png" alt="四半期売上チャート" />
  <figcaption>
    チャートデータの詳細な説明…
  </figcaption>
</figure>

5. 色とコントラスト

コントラスト比(WCAG AA):

  • 通常テキスト:最低4.5:1
  • 大きいテキスト(18pt以上):最低3:1
  • UIコンポーネント:最低3:1

色だけに頼らない:

<!-- 悪い例:色のみ -->
<span style="color: red;">エラー</span>

<!-- 良い例:アイコン+色 -->
<span style="color: red;">
  <svg aria-hidden="true"><!-- エラーアイコン --></svg>
  <span class="sr-only">エラー:</span>
  無効な入力です
</span>

6. フォームとラベル

すべての入力項目にはラベルが必要:

<!-- 明示的なラベル -->
<label for="email">メールアドレス</label>
<input id="email" type="email" />

<!-- 暗黙的なラベル -->
<label>
  メールアドレス
  <input type="email" />
</label>

<!-- アイコンボタン用のaria-label -->
<button aria-label="検索">
  <svg><!-- 検索アイコン --></svg>
</button>

エラーメッセージ:

<input
  id="password"
  aria-invalid="true"
  aria-describedby="password-error"
/>
<div id="password-error" role="alert">
  パスワードは8文字以上である必要があります
</div>

7. 見出しと文書構造

適切な見出し階層:

<h1>ページタイトル</h1>
  <h2>セクション1</h2>
    <h3>サブセクション1.1</h3>
    <h3>サブセクション1.2</h3>
  <h2>セクション2</h2>

レベルをスキップしない: h1 → h2 → h3 (h1 → h3 は不可)

8. 動的コンテンツ

スクリーンリーダーに更新を通知する:

<!-- ポライト:ユーザーの一時停止を待つ -->
<div role="status" aria-live="polite">
  新しいメッセージが5件あります
</div>

<!-- アサーティブ:すぐに割り込む -->
<div role="alert" aria-live="assertive">
  セッションは1分後に期限切れになります
</div>

読み込み状態:

<button aria-busy="true" aria-label="読み込み中…">
  <span aria-hidden="true">読み込み中</span>
</button>

9. スクリーンリーダーテスト

スクリーンリーダー専用テキスト:

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

装飾要素を隠す:

<svg aria-hidden="true"><!-- アイコン --></svg>

10. チェックすべき一般的な問題

不足しているもの:

  • 画像の代替テキスト
  • フォーム入力のラベル
  • 適切な見出し階層
  • キーボードフォーカスインジケーター
  • アイコンボタンのARIAラベル

不適切なもの:

  • 低コントラストのテキスト
  • 非セマンティックなマークアップ(divをボタンとして使用)
  • モーダルでのフォーカス管理の欠如
  • キーボードトラップ
  • 自動再生メディア

テスト:

  • キーボードのみでのナビゲーション
  • スクリーンリーダー(NVDA、JAWS、VoiceOver)
  • 色覚シミュレーション
  • 200%へのズーム
  • 自動ツール(axe、Lighthouse)

11. 自動テスト

ツール:

# Lighthouse
npx lighthouse https://example.com --only-categories=accessibility

# axe-core
npm install --save-dev @axe-core/cli
npx axe https://example.com

# pa11y
npm install --save-dev pa11y
npx pa11y https://example.com

テスト内で:

import { axe } from 'jest-axe';

test('アクセシビリティ違反がないこと', async () => {
  const { container } = render(<MyComponent />);
  const results = await axe(container);
  expect(results).toHaveNoViolations();
});

12. WCAG 2.1 Level AA チェックリスト

知覚可能:

  • 非テキストコンテンツのテキスト代替
  • オーディオ/ビデオのキャプション
  • 適応可能なコンテンツ(セマンティックマークアップ)
  • 十分な色のコントラスト

操作可能:

  • キーボードアクセス可能
  • キーボードトラップがない
  • 適切な時間制限(調整可能)
  • 発作を誘発する点滅がない
  • ナビゲーションスキップリンク
  • 説明的なページタイトル
  • フォーカス順序が理にかなっている
  • リンクの目的が文脈から明らか

理解可能:

  • ページの言語が指定されている(<html lang="ja">)
  • 予測可能なナビゲーション
  • 入力支援(ラベル、指示、エラーメッセージ)

堅牢:

  • 有効なHTML
  • カスタムウィジェットの名前、役割、値
  • 支援技術との互換性

ベストプラクティス

  • アクセシビリティを最初から組み込む
  • 実際の支援技術でテストする
  • まずセマンティックHTML、次にARIA
  • 論理的な文書構造を維持する
  • コンテンツへの複数のアクセス方法を提供する
  • キーボードナビゲーションを徹底的にテストする
  • ズームを無効にしない
  • ランドマークと見出しを使用する

サポートファイル

  • reference/wcag-checklist.md: WCAG 2.1 AA 完全チェックリスト
  • reference/aria-patterns.md: 一般的なARIAウィジェットパターン

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

関連スキル