Master accessibility - WCAG compliance, screen readers, keyboard navigation, inclusive design
Resources
3Install
npx skillscat add pluginagentmarketplace/custom-plugin-ux-design/accessibility Install via the SkillsCat registry.
SKILL.md
Accessibility Skill
Atomic Skill: Ensure digital experiences are usable by everyone through WCAG compliance
Purpose
This skill provides comprehensive guidance on accessibility standards, testing, and remediation.
Skill Invocation
Skill("custom-plugin-ux-design:accessibility")Parameter Schema
Input Parameters
interface AccessibilityParams {
// Required
task: "audit" | "remediate" | "design" | "test";
target: string;
// Optional
level?: "A" | "AA" | "AAA";
scope?: "component" | "page" | "flow" | "application";
platform?: "web" | "mobile" | "desktop";
assistive_tech?: string[];
}Validation Rules
task:
type: enum
required: true
values: [audit, remediate, design, test]
target:
type: string
required: true
min_length: 3
level:
type: enum
default: "AA"
values: [A, AA, AAA]Execution Flow
ACCESSIBILITY EXECUTION
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 1: SCOPE ASSESSMENT
โโโ Identify target scope
โโโ Determine compliance level
โโโ Select testing methods
Step 2: AUDIT
โโโ Automated testing
โโโ Manual testing
โโโ Assistive tech testing
โโโ Document findings
Step 3: CATEGORIZE ISSUES
โโโ Critical (blockers)
โโโ Serious (major barriers)
โโโ Moderate (difficulties)
โโโ Minor (inconveniences)
Step 4: REMEDIATE
โโโ Prioritize by severity
โโโ Implement fixes
โโโ Verify corrections
โโโ Document solutions
Step 5: VALIDATE
โโโ Re-test all issues
โโโ Certify compliance
โโโ Create maintenance plan
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโRetry Logic
retry_config:
max_attempts: 3
backoff_type: exponential
initial_delay_ms: 500
max_delay_ms: 5000
retryable_errors:
- SCANNER_TIMEOUT
- AT_CONNECTION_LOSTLogging Hooks
interface AccessibilityLog {
timestamp: string;
event: "audit_start" | "issue_found" | "remediated" | "verified";
wcag_criterion: string;
severity: string;
element: string;
status: "open" | "fixed" | "verified";
}Learning Modules
Module 1: WCAG Fundamentals
POUR PRINCIPLES
โโโ Perceivable
โ โโโ Text alternatives
โ โโโ Time-based media
โ โโโ Adaptable content
โ โโโ Distinguishable
โโโ Operable
โ โโโ Keyboard accessible
โ โโโ Enough time
โ โโโ Seizure safe
โ โโโ Navigable
โโโ Understandable
โ โโโ Readable
โ โโโ Predictable
โ โโโ Input assistance
โโโ Robust
โโโ Compatible
โโโ Name, role, valueModule 2: Screen Reader Support
SCREEN READER BASICS
โโโ Semantic HTML
โ โโโ Headings (h1-h6)
โ โโโ Landmarks (nav, main, etc.)
โ โโโ Lists (ul, ol, dl)
โ โโโ Tables (proper markup)
โโโ ARIA
โ โโโ Roles
โ โโโ States
โ โโโ Properties
โโโ Focus management
โ โโโ Focus order
โ โโโ Focus trapping
โ โโโ Focus restoration
โโโ Live regions
โโโ aria-live
โโโ Announcements
โโโ Status updatesModule 3: Keyboard Navigation
KEYBOARD REQUIREMENTS
โโโ All interactive elements focusable
โโโ Logical focus order
โโโ Visible focus indicators
โโโ No keyboard traps
โโโ Skip links provided
โโโ Shortcuts documented
COMMON PATTERNS
โโโ Tab: Move forward
โโโ Shift+Tab: Move backward
โโโ Enter/Space: Activate
โโโ Arrow keys: Navigate within
โโโ Escape: Close/cancel
โโโ Home/End: First/lastModule 4: Visual Accessibility
COLOR & CONTRAST
โโโ Text contrast (4.5:1 normal, 3:1 large)
โโโ UI component contrast (3:1)
โโโ Focus indicator contrast (3:1)
โโโ Color not sole indicator
โโโ Dark mode considerations
MOTION & ANIMATION
โโโ Reduce motion preference
โโโ Pause/stop controls
โโโ No autoplay
โโโ Seizure-safe content
โโโ Animation alternativesModule 5: Testing Methods
AUTOMATED TESTING
โโโ Axe DevTools
โโโ WAVE
โโโ Lighthouse
โโโ Pa11y
โโโ HTML validators
MANUAL TESTING
โโโ Keyboard-only navigation
โโโ Zoom to 200%
โโโ High contrast mode
โโโ Color blindness simulation
โโโ Form error states
ASSISTIVE TECH TESTING
โโโ NVDA (Windows)
โโโ JAWS (Windows)
โโโ VoiceOver (Mac/iOS)
โโโ TalkBack (Android)
โโโ Switch accessError Handling
| Error Code | Description | Recovery |
|---|---|---|
A11Y-001 |
Missing alt text | Add descriptive alt |
A11Y-002 |
Contrast failure | Adjust colors |
A11Y-003 |
Keyboard trap | Add escape mechanism |
A11Y-004 |
Missing label | Add visible/hidden label |
A11Y-005 |
Invalid ARIA | Fix ARIA usage |
WCAG Quick Reference
Contrast Requirements
| Content Type | AA Ratio | AAA Ratio |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text (18pt+) | 3:1 | 4.5:1 |
| UI components | 3:1 | 3:1 |
| Focus indicators | 3:1 | 3:1 |
Touch Target Sizes
| Platform | Minimum | Recommended |
|---|---|---|
| Web | 24x24px | 44x44px |
| iOS | 44x44pt | 44x44pt |
| Android | 48x48dp | 48x48dp |
Troubleshooting
Problem: Screen reader announces wrong content
Diagnosis:
โโโ Check: ARIA labels
โโโ Check: DOM order
โโโ Check: Hidden content
โโโ Solution: Align ARIA with visual
Steps:
1. Test with screen reader
2. Check aria-label accuracy
3. Verify DOM = visual order
4. Remove incorrect aria-hiddenProblem: Focus not visible
Diagnosis:
โโโ Check: outline: none in CSS
โโโ Check: :focus styles
โโโ Check: Custom components
โโโ Solution: Add visible focus
Steps:
1. Remove outline removal
2. Add :focus-visible styles
3. Ensure 3:1 contrast
4. Test all interactive elementsUnit Test Templates
describe("AccessibilitySkill", () => {
describe("audit", () => {
it("should detect missing alt text", async () => {
const result = await invoke({
task: "audit",
target: "<img src='photo.jpg'>"
});
expect(result.issues).toContainEqual(
expect.objectContaining({ code: "A11Y-001" })
);
});
});
describe("contrast checking", () => {
it("should calculate contrast ratio", async () => {
const result = await invoke({
task: "audit",
target: { text: "#666666", background: "#ffffff" }
});
expect(result.contrast_ratio).toBeCloseTo(5.74, 1);
});
});
describe("remediation", () => {
it("should suggest fix for contrast failure", async () => {
const result = await invoke({
task: "remediate",
target: { issue: "A11Y-002", colors: ["#999", "#fff"] }
});
expect(result.suggested_color).toMatch(/^#[0-9A-F]{6}$/i);
expect(result.new_contrast).toBeGreaterThanOrEqual(4.5);
});
});
});Quality Metrics
| Metric | Target | Measurement |
|---|---|---|
| WCAG compliance | > 95% | Criteria met |
| Critical issues | 0 | Blockers found |
| Keyboard navigable | 100% | All elements |
| Screen reader compatible | > 95% | AT testing |
Version History
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2025-12-30 | Production-grade upgrade |