/common-accessibility
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use when building interactive components, adding form labels, fixing focus traps, or auditing a11y compliance.
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill common-accessibility --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ
- You can call itInvoke it directly when you want it.
- Slash command
/common-accessibility
Context preview
The summary Claude sees to decide when to auto-load this skill.
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use when building interactive components, adding form labels, fixing focus traps, or auditing a11y compliance.
SKILL.md
common-accessibility.SKILL.mdname: common-accessibility
description: Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use when building interactive components, adding form labels, fixing focus traps, or auditing a11y compliance.
metadata:
triggers:
files:
- '**/*.tsx'
- '**/*.jsx'
- '**/*.html'
- '**/*.vue'
- '**/*.component.html'
keywords:
- accessibility
- a11y
- wcag
- aria
- screen reader
- focus
- alt textCommon Accessibility (a11y) Standards
**Priority: P1 (HIGH)**
> Legal req: EU (Web Accessibility Directive), USA (ADA/Section 508). Non-compliance = litigation risk. Minimum: **WCAG 2.2 Level AA**.
๐ Semantic HTML First
- Use native HTML before ARIA. `<button>`, `<a>`, `<nav>`, `<main>`, `<section>`, `<form>`, `<label>` convey semantics natively.
- Never `<div>`/`<span>` for interactive elements โ no keyboard role by default.
- Headings (`h1`โ`h6`) must form logical outline. One `h1` per page.
- `<button>` not `<div onClick>`, `<a>` not `<span onClick>`.
๐ญ ARIA โ Use Sparingly
ARIA supplements native HTML when insufficient (e.g., custom widgets). Rules:
1. **No ARIA > Bad ARIA**: If native HTML works, use it. ARIA only adds roles, not behavior. 2. **Required attributes**: Every `role` with required properties must include them (e.g., `role="slider"` needs `aria-valuenow`, `aria-valuemin`, `aria-valuemax`). 3. **Live Regions**: Use `aria-live="polite"` for status messages; `aria-live="assertive"` only for critical alerts. 4. **Labels**: Every form control needs programmatic label (`<label>`, `aria-label`, or `aria-labelledby`). 5. **Hidden content**: Use `aria-hidden="true"` on decorative icons; never on focusable elements.
โจ๏ธ Keyboard Navigation
- All interactive elements MUST reachable and operable via keyboard.
- Tab order must follow visual reading order. No positive `tabindex` (`tabindex="1"` breaks natural order).
- Visible focus indicators required (see Focus style rule below).
- **Modals/Dialogs**: Trap focus inside when open. Return focus to trigger element on close.
- **Escape key**: Must close modals, dropdowns, and tooltips.
- **Focus style**: Never `outline: none` without visible replacement (min 2px solid, 3:1 contrast).
๐จ Color & Contrast
- Normal text: โฅ 4.5:1 ratio. Large text (โฅ 18pt or 14pt bold): โฅ 3:1. UI components: โฅ 3:1.
- Never convey information through color alone โ add icon, pattern, or text label.
- Test with: axe DevTools, WAVE, Lighthouse.
๐ Touch & Pointer Targets
- Minimum interactive target size: **44ร44px** (WCAG 2.5.5 AAA) / **24ร24px** minimum (WCAG 2.2 AA).
- Sufficient spacing between adjacent targets โ prevent mis-taps.
๐ผ Images & Media
- Decorative images: `alt="` (empty, not missing).
- Informative images: descriptive `alt` โ what image conveys, not "image ofโฆ".
- Complex charts/graphs: text summary or data table alternative.
- Video: Captions mandatory. Audio descriptions for visual-only content.
๐งช Testing Minimum
- CI gate: `axe-core` zero critical violations.
- Manual: keyboard-only full flow + screen reader (NVDA/VoiceOver) + 200% zoom.
Anti-Patterns
- **No `onClick` on `<div>`**: Use `<button>` or add `role`, `tabindex`, and keyboard handlers.
- **No missing `alt`**: Every `<img>` must `alt` attribute (empty string if decorative).
- **No color-only status**: Red = error must also show icon or text.
- **No `outline: none`** without replacement focus style.
- **No auto-playing media**: Users with vestibular disorders may harmed.
- **No dynamic content without announcement**: Use `aria-live` for async status updates.
References
- [Semantic HTML, ARIA & Focus Patterns](references/REFERENCE.md)
- [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/)
- [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/)
- [axe-core Rules](https://dequeuniversity.com/rules/axe/)
Read more
name: common-accessibility
description: Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use when building interactive components, adding form labels, fixing focus traps, or auditing a11y compliance.
metadata:
triggers:
files:
- '**/*.tsx'
- '**/*.jsx'
- '**/*.html'
- '**/*.vue'
- '**/*.component.html'
keywords:
- accessibility
- a11y
- wcag
- aria
- screen reader
- focus
- alt textCommon Accessibility (a11y) Standards
**Priority: P1 (HIGH)**
> Legal req: EU (Web Accessibility Directive), USA (ADA/Section 508). Non-compliance = litigation risk. Minimum: **WCAG 2.2 Level AA**.
๐ Semantic HTML First
- Use native HTML before ARIA. `<button>`, `<a>`, `<nav>`, `<main>`, `<section>`, `<form>`, `<label>` convey semantics natively.
- Never `<div>`/`<span>` for interactive elements โ no keyboard role by default.
- Headings (`h1`โ`h6`) must form logical outline. One `h1` per page.
- `<button>` not `<div onClick>`, `<a>` not `<span onClick>`.
๐ญ ARIA โ Use Sparingly
ARIA supplements native HTML when insufficient (e.g., custom widgets). Rules:
1. **No ARIA > Bad ARIA**: If native HTML works, use it. ARIA only adds roles, not behavior. 2. **Required attributes**: Every `role` with required properties must include them (e.g., `role="slider"` needs `aria-valuenow`, `aria-valuemin`, `aria-valuemax`). 3. **Live Regions**: Use `aria-live="polite"` for status messages; `aria-live="assertive"` only for critical alerts. 4. **Labels**: Every form control needs programmatic label (`<label>`, `aria-label`, or `aria-labelledby`). 5. **Hidden content**: Use `aria-hidden="true"` on decorative icons; never on focusable elements.
โจ๏ธ Keyboard Navigation
- All interactive elements MUST reachable and operable via keyboard.
- Tab order must follow visual reading order. No positive `tabindex` (`tabindex="1"` breaks natural order).
- Visible focus indicators required (see Focus style rule below).
- **Modals/Dialogs**: Trap focus inside when open. Return focus to trigger element on close.
- **Escape key**: Must close modals, dropdowns, and tooltips.
- **Focus style**: Never `outline: none` without visible replacement (min 2px solid, 3:1 contrast).
๐จ Color & Contrast
- Normal text: โฅ 4.5:1 ratio. Large text (โฅ 18pt or 14pt bold): โฅ 3:1. UI components: โฅ 3:1.
- Never convey information through color alone โ add icon, pattern, or text label.
- Test with: axe DevTools, WAVE, Lighthouse.
๐ Touch & Pointer Targets
- Minimum interactive target size: **44ร44px** (WCAG 2.5.5 AAA) / **24ร24px** minimum (WCAG 2.2 AA).
- Sufficient spacing between adjacent targets โ prevent mis-taps.
๐ผ Images & Media
- Decorative images: `alt="` (empty, not missing).
- Informative images: descriptive `alt` โ what image conveys, not "image ofโฆ".
- Complex charts/graphs: text summary or data table alternative.
- Video: Captions mandatory. Audio descriptions for visual-only content.
๐งช Testing Minimum
- CI gate: `axe-core` zero critical violations.
- Manual: keyboard-only full flow + screen reader (NVDA/VoiceOver) + 200% zoom.
Anti-Patterns
- **No `onClick` on `<div>`**: Use `<button>` or add `role`, `tabindex`, and keyboard handlers.
- **No missing `alt`**: Every `<img>` must `alt` attribute (empty string if decorative).
- **No color-only status**: Red = error must also show icon or text.
- **No `outline: none`** without replacement focus style.
- **No auto-playing media**: Users with vestibular disorders may harmed.
- **No dynamic content without announcement**: Use `aria-live` for async status updates.
References
- [Semantic HTML, ARIA & Focus Patterns](references/REFERENCE.md)
- [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/)
- [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/)
- [axe-core Rules](https://dequeuniversity.com/rules/axe/)
The portable SDLC standards layer for AI coding agents. Sync once, then work in your own runtime.
Repo: hoangnguyen0403/agent-skills-standard
Other skills on agent-skills-standard.
- /android-agp-upgrade
Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.
Open skill - /android-architecture
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow
Open skill - /android-background-work
Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.
Open skill - /android-compose-migration
Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.
Open skill - /android-compose
Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.
Open skill - /android-concurrency
Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes,
Open skill

