Communitygithub.com

SamuelChien/mega-skills-collection

アクセシビリティ監査スキル。React、Next.js、Vue、Angular、Svelte、プレーンHTMLコードベースでWCAG 2.2レベルAおよびAA準拠のスキャン、修正、検証を行います。アクセシビリティ監査、a11y違反の修正、カラーコントラストの確認、コンプライアンスレポートの生成、CI/CDパイプラインへの統合に使用します。

mega-skills-collection とは?

a11y-audit スキルは、最新のWebアプリケーション向けの完全なアクセシビリティ監査パイプラインを提供します。スキャン、修正、検証という3フェーズのワークフローを実装し、WCAG 2.2レベルAおよびAAの違反を特定し、フレームワークごとに正確な修正コードを生成し、関係者向けのコンプライアンスレポートを作成します。React、Next.js、Vue、Angular、Svelte、プレーンHTMLを自動検出し、各フレームワークに最適化された修正パターンを提供します。Critical、Major、Minorの重大度分類、カラーコントラスト分析と代替色の提案、WCAG 2.2の新規達成基準(フォーカス表示、ドラッグ操作、ターゲットサイズなど)への対応、GitHub Actions、GitLab CI、Azure DevOpsとのCI/CD統合が主な差別化要因です。スラッシュコマンド `/a11y-audit` による対話的な監査セッションもサポートしています。

対応~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/a11y-audit

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

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

ドキュメント

アクセシビリティ監査


名前: a11y-audit ティア: STANDARD カテゴリ: エンジニアリング - フロントエンド品質 依存関係: Python 3.8+ (標準ライブラリのみ) 作成者: Alireza Rezvani バージョン: 2.1.2 最終更新日: 2026-03-18 ライセンス: MIT


名前

a11y-audit -- WCAG 2.2 アクセシビリティ監査および是正スキル

説明

a11y-audit スキルは、最新のWebアプリケーション向けの完全なアクセシビリティ監査パイプラインを提供します。スキャン、修正、検証の3フェーズワークフローを実装し、WCAG 2.2レベルAおよびAAの違反を特定し、フレームワークごとに正確な修正コードを生成し、関係者向けのコンプライアンスレポートを作成します。

このスキルは検出を超えた機能を提供します。見つけたすべての違反に対して、フレームワーク(React、Next.js、Vue、Angular、Svelte、またはプレーンHTML)に合わせた正確な修正前/修正後のコードを提供します。React JSXの <img> における alt 属性の欠落が、Vue SFCやAngularテンプレートの同じ問題とは異なる修正パターンを必要とすることを理解しています。

このスキルの機能:

  1. スキャン: コードベース内のすべてのWCAG 2.2レベルAおよびAA違反を重大度(Critical、Major、Minor)で分類してスキャンします
  2. 修正: フレームワーク固有の修正前/修正後のコードパターンで各違反を修正します
  3. 検証: 修正が元の違反を解決し、回帰を引き起こさないことを確認します
  4. レポート: 開発者、PM、コンプライアンス関係者に適した構造化形式で調査結果を報告します
  5. 統合: CI/CDパイプラインに統合してアクセシビリティの回帰を防止します

主な差別化要因:

  • フレームワークを認識した修正パターン(汎用的なHTMLアドバイスではない)
  • アクセシブルな代替色の提案を含むカラーコントラスト分析
  • WCAG 2.2の新規達成基準(フォーカス表示、ドラッグ操作、ターゲットサイズ)への対応
  • GitHub Actions、GitLab CI、Azure DevOpsとのCI/CDパイプライン統合
  • /a11y-audit スラッシュコマンドのサポート

機能

コア機能

機能説明
完全WCAG 2.2スキャンコードベース全体のすべてのレベルAおよびAA達成基準をチェックします
フレームワーク検出React、Next.js、Vue、Angular、Svelte、またはプレーンHTMLを自動検出します
重大度分類各違反をCritical、Major、Minorに分類します
修正コード生成すべての問題に対して修正前/修正後のコード差分を生成します
カラーコントラストチェッカー前景/背景の組み合わせをAAおよびAAA比率に対して検証します
アクセシブルな代替案コントラスト要件を満たす代替色を提案します
コンプライアンスレポート合格/不合格のサマリーを含む関係者向けレポートを生成します
CI/CD統合GitHub Actions、GitLab CI、Azure DevOpsのパイプライン設定
キーボードナビゲーション監査フォーカス管理の欠落やタブ順序の問題を検出します
ARIA検証不正確、冗長、または欠落しているARIA属性をチェックします
ライブ領域検出aria-live アナウンスが欠落している動的コンテンツを識別します
フォームアクセシビリティラベル関連付け、エラーメッセージ、入力タイプを検証します

WCAG 2.2 カバレッジマトリックス

原則レベルA基準レベルAA基準
知覚可能1.1.1 非テキストコンテンツ、1.2.1-1.2.3 時間依存メディア、1.3.1-1.3.3 適応可能、1.4.1-1.4.2 識別可能1.3.4-1.3.5 適応可能、1.4.3-1.4.5 コントラストと文字画像、1.4.10-1.4.13 リフローとコンテンツ
操作可能2.1.1-2.1.2 キーボード、2.2.1-2.2.2 タイミング、2.3.1 発作、2.4.1-2.4.4 ナビゲーション可能、2.5.1-2.5.4 入力2.4.5-2.4.7 ナビゲーション可能、2.4.11 フォーカス表示 (NEW 2.2)、2.5.7 ドラッグ (NEW 2.2)、2.5.8 ターゲットサイズ (NEW 2.2)
理解可能3.1.1 言語、3.2.1-3.2.2 予測可能、3.3.1-3.3.2 入力支援3.1.2 部分の言語、3.2.3-3.2.4 予測可能、3.3.3-3.3.4 エラー処理、3.3.7 冗長エントリ (NEW 2.2)、3.3.8 アクセシブル認証 (NEW 2.2)
堅牢4.1.2 名前/役割/値4.1.3 ステータスメッセージ

重大度の定義

重大度定義例SLA
Criticalユーザーグループ全体のアクセスを阻害情報画像の代替テキスト欠落、主要ナビゲーションへのキーボードアクセス不可リリース前に修正
Majorエクスペリエンスを低下させる重大な障壁本文テキストのカラーコントラスト不足、フォームラベルの欠落現在のスプリント内で修正
Minor摩擦を引き起こすユーザビリティの問題冗長なARIAロール、最適でない見出し階層次の2スプリント以内に修正

使用方法

クイックスタート

スキルをアクティブにして、プロジェクトの監査を実行します:

# プロジェクト全体をスキャン
python scripts/a11y_scanner.py /path/to/project

# JSON出力でスキャン(ツール連携用)
python scripts/a11y_scanner.py /path/to/project --json

# 特定の値のカラーコントラストをチェック
python scripts/contrast_checker.py --fg "#777777" --bg "#ffffff"

# CSS/Tailwindファイル全体のコントラストをチェック
python scripts/contrast_checker.py --file /path/to/styles.css

スラッシュコマンド

対話的な監査セッションには /a11y-audit スラッシュコマンドを使用します:

/a11y-audit                    # 現在のプロジェクトを監査
/a11y-audit --scope src/       # 特定のディレクトリを監査
/a11y-audit --fix              # 監査し修正を自動適用
/a11y-audit --report           # 関係者向けレポートを生成
/a11y-audit --ci               # CI互換の結果を出力

3フェーズワークフロー

フェーズ1: スキャン

スキャナーはソースツリーを走査し、使用中のフレームワークを検出し、適切なルールセットを適用します。

python scripts/a11y_scanner.py /path/to/project --format table

出力例:

A11Y 監査レポート - /path/to/project
検出されたフレームワーク: React (Next.js)
スキャンしたファイル数: 127
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

CRITICAL (3件の問題)
  [1.1.1] src/components/Hero.tsx:14
    <img>要素に代替テキストがありません
  [2.1.1] src/components/Modal.tsx:8
    モーダルダイアログ内でフォーカスがトラップされていません
  [1.4.3] src/styles/globals.css:42
    .subtitle のコントラスト比 2.8:1 (4.5:1が必要)

MAJOR (7件の問題)
  [2.4.11] src/components/Button.tsx:22
    フォーカスインジケータが表示されていません (2pxのアウトラインが必要)
  [1.3.1] src/components/Form.tsx:31
    入力に関連付けられた <label> がありません
  ...

MINOR (4件の問題)
  [1.3.1] src/components/Nav.tsx:5
    <nav> に冗長な role="navigation" があります
  ...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
サマリー: 14件の違反 (Critical 3件、Major 7件、Minor 4件)
WCAG 2.2 レベルA:  8件の問題
WCAG 2.2 レベルAA: 6件の問題

フェーズ2: 修正

各違反に対して、フレームワーク固有の修正を適用します。スキルは、すべての問題タイプに対して正確な修正前/修正後のコードを提供します。

完全な修正カタログについては、以下のフレームワーク別修正パターンセクションを参照してください。

フェーズ3: 検証

スキャナーを再実行して、すべての修正が適用され、回帰が発生していないことを確認します:

# 修正後に再スキャン
python scripts/a11y_scanner.py /path/to/project --format table

# ベースラインと比較
python scripts/a11y_scanner.py /path/to/project --baseline audit-baseline.json

検証出力:

検証結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
前回のスキャン:  14件の違反 (Critical 3件、Major 7件、Minor 4件)
今回のスキャン:    2件の違反 (Critical 0件、Major 1件、Minor 1件)
解決済み:       12件の違反
新規問題:        0件の回帰

ステータス: 改善 (85.7%削減)

例

例1: Reactコンポーネントの監査

複数のアクセシビリティ問題があるReactコンポーネント:

// 修正前: src/components/ProductCard.tsx
function ProductCard({ product }) {
  return (
    <div onClick={() => navigate(`/product/${product.id}`)}>
      <img src={product.image} />
      <div style={{ color: '#aaa', fontSize: '12px' }}>
        {product.name}
      </div>
      <span style={{ color: '#999' }}>${product.price}</span>
    </div>
  );
}

検出された違反:

#WCAG重大度問題
11.1.1Critical<img> に alt 属性がありません
22.1.1Critical<div onClick> がキーボード操作できません
31.4.3Major白地に色 #aaa はコントラスト不合格 (2.32:1、4.5:1が必要)
41.4.3Major白地に色 #999 はコントラスト不合格 (2.85:1、4.5:1が必要)
54.1.2Majorインタラクティブ要素にロールとアクセシブルな名前がありません
// 修正後: src/components/ProductCard.tsx
function ProductCard({ product }) {
  return (
    <a
      href={`/product/${product.id}`}
      className="product-card"
      aria-label={`${product.name} - $${product.price} を表示`}
    >
      <img src={product.image} alt={product.imageAlt || product.name} />
      <div style={{ color: '#595959', fontSize: '12px' }}>
        {product.name}
      </div>
      <span style={{ color: '#767676' }}>${product.price}</span>
    </a>
  );
}

変更点:

  • <div onClick> を <a href> に置き換え、ネイティブのキーボードとスクリーンリーダーをサポート
  • <img> に意味のあるフォールバックを持つ alt 属性を追加
  • aria-label で支援技術に完全なコンテキストを提供
  • 色 #aaa を #595959 に置き換え (7.01:1のコントラスト比 -- AAおよびAAA合格)
  • 色 #999 を #767676 に置き換え (4.54:1のコントラスト比 -- AA合格)

例2: Vue SFCフォームの監査

<!-- 修正前: src/components/LoginForm.vue -->
<template>
  <form @submit="handleLogin">
    <input type="text" placeholder="メールアドレス" v-model="email" />
    <input type="password" placeholder="パスワード" v-model="password" />
    <div v-if="error" style="color: red">{{ error }}</div>
    <div @click="handleLogin">サインイン</div>
  </form>
</template>

検出された違反:

#WCAG重大度問題
11.3.1Critical入力に <label> 要素が関連付けられていません
23.3.2Majorプレースホルダーテキストが唯一のラベルとして使用されています (入力時に消失)
32.1.1Critical<div @click> がキーボード操作できません
44.1.3Majorエラーメッセージがスクリーンリーダーに通知されません
53.3.1Majorエラーがプログラム的に入力に関連付けられていません
<!-- 修正後: src/components/LoginForm.vue -->
<template>
  <form @submit.prevent="handleLogin" aria-label="アカウントにサインイン">
    <div class="field">
      <label for="login-email">メールアドレス</label>
      <input
        id="login-email"
        type="email"
        v-model="email"
        autocomplete="email"
        required
        :aria-describedby="emailError ? 'email-error' : undefined"
        :aria-invalid="!!emailError"
      />
      <span v-if="emailError" id="email-error" role="alert">
        {{ emailError }}
      </span>
    </div>
    <div class="field">
      <label for="login-password">パスワード</label>
      <input
        id="login-password"
        type="password"
        v-model="password"
        autocomplete="current-password"
        required
        :aria-describedby="passwordError ? 'password-error' : undefined"
        :aria-invalid="!!passwordError"
      />
      <span v-if="passwordError" id="password-error" role="alert">
        {{ passwordError }}
      </span>
    </div>
    <div v-if="error" role="alert" aria-live="assertive" class="form-error">
      {{ error }}
    </div>
    <button type="submit">サインイン</button>
  </form>
</template>

例3: Angularテンプレートの監査

<!-- 修正前: src/app/dashboard/dashboard.component.html -->
<div class="tabs">
  <div *ngFor="let tab of tabs"
       (click)="selectTab(tab)"
       [class.active]="tab.active">
    {{ tab.label }}
  </div>
</div>
<div class="tab-content">
  <div *ngIf="selectedTab">{{ selectedTab.content }}</div>
</div>

検出された違反:

#WCAG重大度問題
14.1.2CriticalタブウィジェットにARIAロール (tablist、tab、tabpanel) がありません
22.1.1Criticalタブがキーボードで操作できません (矢印キー、Home、End)
32.4.11Majorアクティブなタブに表示可能なフォーカスインジケータがありません
<!-- 修正後: src/app/dashboard/dashboard.component.html -->
<div class="tabs" role="tablist" aria-label="ダッシュボードセクション">
  <button
    *ngFor="let tab of tabs; let i = index"
    role="tab"
    [id]="'tab-' + tab.id"
    [attr.aria-selected]="tab.active"
    [attr.aria-controls]="'panel-' + tab.id"
    [attr.tabindex]="tab.active ? 0 : -1"
    (click)="selectTab(tab)"
    (keydown)="handleTabKeydown($event, i)"
    class="tab-button"
    [class.active]="tab.active">
    {{ tab.label }}
  </button>
</div>
<div
  *ngIf="selectedTab"
  role="tabpanel"
  [id]="'panel-' + selectedTab.id"
  [attr.aria-labelledby]="'tab-' + selectedTab.id"
  tabindex="0"
  class="tab-content">
  {{ selectedTab.content }}
</div>

キーボードナビゲーションをサポートするTypeScript:

// dashboard.component.ts
handleTabKeydown(event: KeyboardEvent, index: number): void {
  const tabCount = this.tabs.length;
  let newIndex = index;

  switch (event.key) {
    case 'ArrowRight':
      newIndex = (index + 1) % tabCount;
      break;
    case 'ArrowLeft':
      newIndex = (index - 1 + tabCount) % tabCount;
      break;
    case 'Home':
      newIndex = 0;
      break;
    case 'End':
      newIndex = tabCount - 1;
      break;
    default:
      return;
  }

  event.preventDefault();
  this.selectTab(this.tabs[newIndex]);
  // 新しいタブボタンにフォーカスを移動
  const tabElement = document.getElementById(`tab-${this.tabs[newIndex].id}`);
  tabElement?.focus();
}

例4: Next.jsページレベルの監査

// 修正前: src/app/page.tsx
export default function Home() {
  return (
    <main>
      <div className="text-4xl font-bold">Acmeへようこそ</div>
      <div className="mt-4">
        当社のプラットフォームでより良い製品を構築しましょう。
      </div>
      <div className="mt-8 bg-blue-600 text-white px-6 py-3 rounded cursor-pointer"
           onClick={() => router.push('/signup')}>
        はじめる
      </div>
    </main>
  );
}

検出された違反:

#WCAG重大度問題
11.1.1Critical装飾画像に代替テキストがありません
22.1.1Criticalクリック可能な <div> はキーボード操作できません
31.4.3Major青 bg-blue-600 (#2563eb) 上に白テキスト、コントラスト比 3.2:1 (4.5:1が必要)
42.4.11Majorインタラクティブ要素に表示可能なフォーカススタイルがありません
// 修正後: src/app/page.tsx
export default function Home() {
  return (
    <main>
      <h1 className="text-4xl font-bold">Acmeへようこそ</h1>
      <p className="mt-4">
        当社のプラットフォームでより良い製品を構築しましょう。
      </p>
      <a
        href="/signup"
        className="mt-8 inline-block bg-blue-700 text-white px-6 py-3 rounded focus:outline-2 focus:outline-blue-500"
      >
        はじめる
      </a>
    </main>
  );
}

変更点:

  • 意味のない <div> をセマンティックな <h1> と <p> に置き換え
  • キーボード操作可能な <div onClick> をネイティブな <a href> に置き換え
  • アクセシブルなラベルを付与できるよう背景色を bg-blue-600 から bg-blue-700 に変更
  • フォーカス可視性のための focus:outline-2 focus:outline-blue-500 クラスを追加

Individual skills in this repo

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

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

2D game development principles. Sprites, tilemaps, physics, camera.

SamuelChien/mega-skills-collection

3D game development principles. Rendering, shaders, physics, cameras.

SamuelChien/mega-skills-collection

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through hash verification.

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

関連スキル