Accessibility Compliance

作者 aj-geddes3f5182cfd739无许可证355 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7个月前更新

Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard navigation, and a11y testing. Use when building inclusive web applications, ensuring regulatory compliance, or improving user experience for people with disabilities.

AI 生成的概览

指导实现 WCAG 2.1/2.2 网页无障碍、屏幕阅读器兼容与键盘导航。

功能
该技能提供遵循 WCAG 2.1/2.2 实现网页无障碍的说明与参考指南,涵盖语义化 HTML 与 ARIA、键盘导航、焦点管理、颜色对比度、屏幕阅读器播报以及可访问的 React 组件。它附带一个组件模板和最佳实践的正反清单。其产出是指导与代码模式,本身不运行任何工具。
适用场景
适用于构建面向公众或强调包容性的 Web 应用、追求 WCAG AA 或 AAA 合规、支持 NVDA、JAWS、VoiceOver 等屏幕阅读器,或满足 ADA 与 Section 508 要求的场景。也适合无障碍审计和纯键盘导航相关工作。
运行要求
无需脚本或工具,仅为说明文档与参考文档。代理能够读取随附的参考指南和模板即可。

Accessibility Compliance

Table of Contents

Overview

Implement comprehensive accessibility features following WCAG guidelines to ensure your application is usable by everyone, including people with disabilities.

When to Use

  • Building public-facing web applications
  • Ensuring WCAG 2.1/2.2 AA or AAA compliance
  • Supporting screen readers (NVDA, JAWS, VoiceOver)
  • Implementing keyboard-only navigation
  • Meeting ADA, Section 508, or similar regulations
  • Improving SEO and overall user experience
  • Conducting accessibility audits

Quick Start

Minimal working example:

html
<!-- Bad: Non-semantic markup --><div class="button" onclick="submit()">Submit</div>
<!-- Good: Semantic HTML --><button type="submit" aria-label="Submit form">Submit</button>
<!-- Custom components with proper ARIA --><div  role="button"  tabindex="0"  aria-pressed="false"  onclick="toggle()"  onkeydown="handleKeyPress(event)">  Toggle Feature</div>
<!-- Form with proper labels and error handling --><form>  <label for="email">Email Address</label>  <input    id="email"    type="email"    name="email"    aria-required="true"// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Semantic HTML with ARIA [blocked]Semantic HTML with ARIA
React Component with Accessibility [blocked]React Component with Accessibility
Keyboard Navigation Handler [blocked]Keyboard Navigation Handler
Color Contrast Validator [blocked]Color Contrast Validator
Screen Reader Announcements [blocked]Screen Reader Announcements
Focus Management [blocked]Focus Management

Best Practices

✅ DO

  • Use semantic HTML elements
  • Provide text alternatives for images
  • Ensure sufficient color contrast (4.5:1 minimum)
  • Support keyboard navigation
  • Implement focus management
  • Test with screen readers
  • Use ARIA attributes correctly
  • Provide skip links
  • Make forms accessible with labels
  • Support text resizing up to 200%

❌ DON'T

  • Rely solely on color to convey information
  • Remove focus indicators
  • Use only mouse/touch interactions
  • Auto-play media without controls
  • Create keyboard traps
  • Use positive tabindex values
  • Override user preferences
  • Hide content only visually that should be hidden from screen readers

来源与署名

来源:aj-geddes/useful-ai-prompts位于skills/accessibility-compliance提交3f5182c

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架