Skill Market

accessibility

WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。

GitHub
githubcommunity
0.0
0 installs262.1K GitHub starsby affaan-m

Skill Introduction

Overview
WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。

Core value

Turns reusable Documentation know-how into an installable skill, helping users complete github, community work faster.

Target users

  • Developers, testers, and maintainers who handle Documentation tasks in Focus Code.
  • Teams that already trust workflows or content from affaan-m.
  • Users who want standardized prompts, steps, or conventions instead of repeating setup work.

Best practices

  • Read the skill content first to confirm required inputs, expected outputs, and dependencies.
  • Try it on a small task before relying on it for critical work.
  • Add project-specific constraints such as coding style, target platform, test expectations, and delivery format.
  • For external sources, verify the source link, version, and recent maintenance activity.

Best use cases

  • Tasks related to github, community that need a reusable execution flow.
  • Converting a community repo, team convention, or personal workflow into day-to-day assistance.
  • Starting from a proven skill instead of writing prompts or procedures from scratch.

Limits and boundaries

  • Results depend on the quality of the original skill content and may need human correction.
  • It does not replace code review, tests, security review, or professional judgment.
  • External tools, APIs, account permissions, and local dependencies still need separate setup.

Differentiation

  • Structured around Documentation, making it easier to discover and reuse than loose prompt snippets.
  • Marked as GitHub, which helps users judge trust and maintenance expectations.
  • Keeps the original source link available for repository, documentation, or discussion follow-up.
  • Tagged with github, community, so it can be filtered by concrete task intent.

Install and use

Install
Copy Install Command
focus install accessibility-5faf9a
View source

Detail Preview

SKILL.md

Primary filemarkdown9 KB

name: accessibility description: WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。 origin: ECC

アクセシビリティ(WCAG 2.2)

このスキルは、スクリーンリーダー、スイッチコントロール、キーボードナビゲーションを使用するユーザーを含む、すべてのユーザーにとってデジタルインターフェースが知覚可能・操作可能・理解可能・堅牢(POUR)であることを保証します。WCAG 2.2 達成基準の技術的な実装に焦点を当てています。

使用タイミング

  • Web、iOS、Android 向け UI コンポーネント仕様の定義。
  • アクセシビリティの障壁やコンプライアンスのギャップについて既存コードを監査する。
  • Target Size(最小)や Focus Appearance など新しい WCAG 2.2 基準を実装する。
  • 高水準な設計要件を技術属性(ARIA ロール、トレイト、ヒント)にマッピングする。

コアコンセプト

  • POUR 原則: WCAG の基盤(知覚可能・操作可能・理解可能・堅牢)。
  • セマンティックマッピング: 汎用コンテナよりネイティブ要素を使用して組み込みのアクセシビリティを提供する。
  • アクセシビリティツリー: 支援技術が実際に「読み取る」UI の表現。
  • フォーカス管理: キーボード・スクリーンリーダーカーソルの順序と可視性を制御する。
  • ラベリングとヒント: aria-label、accessibilityLabel、contentDescription を通じてコンテキストを提供する。

仕組み

ステップ 1: コンポーネントロールの特定

機能的な目的を決定します(例:これはボタンか、リンクか、タブか)。カスタムロールに頼る前に、利用可能な最もセマンティックなネイティブ要素を使用します。

ステップ 2: 知覚可能属性の定義

  • テキストのコントラストが 4.5:1(通常)または 3:1(大きいテキスト・UI)を満たすことを確認。
  • 非テキストコンテンツ(画像、アイコン)にテキスト代替を追加。
  • レスポンシブリフロー(機能を損なわずに最大 400% ズーム)を実装。

ステップ 3: 操作可能なコントロールの実装

  • 最小 24x24 CSS ピクセルのターゲットサイズを確保(WCAG 2.2 SC 2.5.8)。
  • すべてのインタラクティブ要素がキーボードで到達可能で、可視のフォーカスインジケーターを持つことを確認(SC 2.4.11)。
  • ドラッグ操作の単一ポインター代替手段を提供。

ステップ 4: 理解可能なロジックの確保

  • 一貫したナビゲーションパターンを使用。
  • 修正のための説明的なエラーメッセージと提案を提供(SC 3.3.3)。
  • 同じデータを二度求めないよう「冗長入力防止」(SC 3.3.7)を実装。

ステップ 5: 堅牢な互換性の検証

  • 正しい Name, Role, Value パターンを使用。
  • 動的なステータス更新のために aria-live またはライブリージョンを実装。

アクセシビリティアーキテクチャ図

flowchart TD
  UI["UI コンポーネント"] --> Platform{プラットフォーム?}
  Platform -->|Web| ARIA["WAI-ARIA + HTML5"]
  Platform -->|iOS| SwiftUI["アクセシビリティトレイト + ラベル"]
  Platform -->|Android| Compose["セマンティクス + コンテンツ説明"]

  ARIA --> AT["支援技術(スクリーンリーダー、スイッチ)"]
  SwiftUI --> AT
  Compose --> AT

クロスプラットフォームマッピング

機能Web (HTML/ARIA)iOS (SwiftUI)Android (Compose)
プライマリラベルaria-label / <label>.accessibilityLabel()contentDescription
セカンダリヒントaria-describedby.accessibilityHint()Modifier.semantics { stateDescription = ... }
アクションロールrole="button".accessibilityAddTraits(.isButton)Modifier.semantics { role = Role.Button }
ライブ更新aria-live="polite".accessibilityLiveRegion(.polite)Modifier.semantics { liveRegion = LiveRegionMode.Polite }

例

Web: アクセシブルな検索

<form role="search">
  <label for="search-input" class="sr-only">Search products</label>
  <input type="search" id="search-input" placeholder="Search..." />
  <button type="submit" aria-label="Submit Search">
    <svg aria-hidden="true">...</svg>
  </button>
</form>

iOS: アクセシブルなアクションボタン

Button(action: deleteItem) {
    Image(systemName: "trash")
}
.accessibilityLabel("Delete item")
.accessibilityHint("Permanently removes this item from your list")
.accessibilityAddTraits(.isButton)

Android: アクセシブルなトグル

Switch(
    checked = isEnabled,
    onCheckedChange = { onToggle() },
    modifier = Modifier.semantics {
        contentDescription = "Enable notifications"
    }
)

避けるべきアンチパターン

  • Div ボタン: ロールとキーボードサポートを追加せずに <div> や <span> をクリックイベントに使用する。
  • 色のみの意味: エラーやステータスを色の変化_のみ_で示す(例:ボーダーを赤にする)。
  • モーダルフォーカスの未封じ込め: フォーカスをトラップしないモーダルで、キーボードユーザーがモーダル開放中に背景コンテンツをナビゲートできてしまう。フォーカスは封じ込め_かつ_Escape キーまたは明示的な閉じるボタンで脱出可能でなければならない(WCAG SC 2.1.2)。
  • 冗長な代替テキスト: alt テキストに「Image of...」や「Picture of...」を使用する(スクリーンリーダーはすでに「画像」というロールをアナウンスする)。

ベストプラクティスチェックリスト

  • インタラクティブ要素が 24x24px(Web)または 44x44pt(ネイティブ)のターゲットサイズを満たしている。
  • フォーカスインジケーターが明確に見え、高コントラストである。
  • モーダルは開いている間フォーカスを封じ込め、閉じる際にクリーンに解放する(Escape キーまたは閉じるボタン)。
  • ドロップダウンとメニューは閉じる際にトリガー要素にフォーカスを戻す。
  • フォームはテキストベースのエラー提案を提供する。
  • アイコンのみのボタンには説明的なテキストラベルがある。
  • テキストが拡大縮小されるとコンテンツが適切にリフローする。

参考資料

関連スキル

  • frontend-patterns
  • design-system
  • liquid-glass-design
  • swiftui-patterns

Reviews

Overall rating

0.0
0.0

0 comments

No reviews yet