frontend-accessibility

使用语义化HTML、ARIA属性、键盘导航和WCAG合规性构建可访问的用户界面。在创建或修改UI组件、表单、交互式元素、导航菜单、模态框或任何面向用户的界面代码时使用此技能。在处理Astro组件文件(.astro)、React/Vue/Svelte组件文件、HTML模板文件、带有输入和标签的表单组件、导航菜单和交互式组件、模态对话框和手风琴、带有替代文本的图像组件、按钮和链接实现、焦点管理代码或屏幕阅读器通知逻辑时使用。

📖 中文导读:使用语义化HTML、ARIA属性、键盘导航和WCAG合规性构建可访问的用户界面。在创建或修改UI组件、表单、交互式元素、导航菜单、模态框或任何面向用户的界面代码时使用此技能。在处理Astro组件文件(.astro)、React/Vue/Svelte组件文件、HTML模板文件、带有输入和标签的表单组件、导航菜单和交互式组件、模态对话框和手风琴、带有替代文本的图像组件、按钮和链接实现、焦点管理代码或屏幕阅读器通知逻辑时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Frontend Accessibility description: Build accessible user interfaces using semantic HTML, ARIA attributes, keyboard navigation, and WCAG compliance. Use this skill when creating or modifying UI components, forms, interactive elements, navigation menus, modals, or any user-facing interface code. When working on Astro component files (.astro), React/Vue/Svelte component files, HTML template files, form components with inputs and labels, navigation menus and interactive widgets, modal dialogs and accordions, image components with alt text, button and link implementations, focus management code, or screen reader announcement logic.

Frontend Accessibility

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle frontend accessibility.

When to use this skill

  • When creating or editing Astro components (.astro files)
  • When building React, Vue, Svelte, or other framework components
  • When implementing forms with input fields, labels, validation, and error messages
  • When creating navigation menus, breadcrumbs, or site navigation structures
  • When building interactive components (modals, dropdowns, accordions, tabs, tooltips)
  • When adding images and ensuring proper alt text and figure captions
  • When implementing keyboard navigation or focus management
  • When creating buttons, links, or custom interactive elements
  • When using ARIA attributes (roles, labels, live regions, expanded states)
  • When ensuring color contrast ratios meet WCAG standards
  • When implementing skip links or other accessibility navigation aids

Instructions

For details, refer to the information provided in this file: frontend accessibility