Communitygithub.com

无障碍访问

WCAG 2.1 AA 标准——语义化 HTML、键盘导航、屏幕阅读器支持。

无障碍访问 是什么?

该技能专注于确保 Web 应用符合 WCAG 2.1 AA 无障碍标准,涵盖语义化 HTML、键盘导航、屏幕阅读器兼容性等核心实践。通过强制使用正确的 HTML 元素(如 `<button>`、`<nav>`、`<main>` 等)替代通用 `<div>` 绑定事件,在语义 HTML 无法满足需求时合理添加 ARIA 属性。技能还强调焦点管理(模态框内焦点循环、路由切换后焦点重置)、颜色对比度(普通文本 4.5:1,大文本 3:1)、图片替代文本(装饰性图片使用空 `alt`)、表单标签可见关联(`htmlFor`)以及“跳过导航”链接的放置。最后,要求使用 VoiceOver(Mac)或 NVDA(Windows)进行屏幕阅读器测试,确保实际可访问性。该技能适用于任何遵循 WCAG 标准的 Web 开发项目。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/accessibility

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

无障碍访问 是做什么的?

规则

  • 语义化 HTML:使用 <button>、<nav>、<main>、<article> 等元素,而非 <div onClick>。
  • 仅在语义 HTML 无法表达模式时使用 ARIA 属性。
  • 键盘导航:每个可交互元素必须可通过键盘触及并操作。
  • 焦点管理:模态框应限制焦点循环,路由切换时焦点移至主要内容。
  • 颜色对比度:普通文本 4.5:1,大文本(18px+ 或 14px+ 加粗)3:1。
  • 所有图片设置替代文本——装饰性图片使用空 alt=""。
  • 表单标签:每个输入项拥有可见的 <label>,并通过 htmlFor 属性关联。
  • 跳过导航链接:作为页面第一个可获得焦点的元素。
  • 屏幕阅读器测试:使用 VoiceOver(Mac)或 NVDA(Windows)进行测试。

Individual skills in this repo

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

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Tenant isolation (row-level vs schema), subdomain routing, per-tenant config, and data partitioning.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相关技能