frontend-accessibility
使用语义化HTML、ARIA属性、键盘导航和适当的颜色对比度构建可访问的用户界面。在创建或修改UI组件、实现表单和交互式元素、处理导航菜单、构建模态对话框和对话框、添加图像和媒体内容、编写JSX/HTML标记、确保键盘可访问性、使用屏幕阅读器测试、管理焦点状态、实现适当的标题层次结构、为图像提供替代文本、保持颜色对比度、使用ARIA标签和角色或确保所有交互元素可通过键盘导航时使用此技能。在构建前端组件、审查UI可访问性、重构标记以获得更好的语义或实现WCAG合规要求时应用此技能。
📖 中文导读:使用语义化HTML、ARIA属性、键盘导航和适当的颜色对比度构建可访问的用户界面。在创建或修改UI组件、实现表单和交互式元素、处理导航菜单、构建模态对话框和对话框、添加图像和媒体内容、编写JSX/HTML标记、确保键盘可访问性、使用屏幕阅读器测试、管理焦点状态、实现适当的标题层次结构、为图像提供替代文本、保持颜色对比度、使用ARIA标签和角色或确保所有交互元素可通过键盘导航时使用此技能。在构建前端组件、审查UI可访问性、重构标记以获得更好的语义或实现WCAG合规要求时应用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Frontend Accessibility description: Build accessible user interfaces using semantic HTML, ARIA attributes, keyboard navigation, and proper color contrast. Use this skill when creating or modifying UI components, implementing forms and interactive elements, working with navigation menus, building modals and dialogs, adding images and media content, writing JSX/HTML markup, ensuring keyboard accessibility, testing with screen readers, managing focus states, implementing proper heading hierarchies, providing alternative text for images, maintaining color contrast ratios, using ARIA labels and roles, or ensuring all interactive elements are keyboard-navigable. Apply this skill when building frontend components, reviewing UI accessibility, refactoring markup for better semantics, or implementing WCAG compliance requirements.
Frontend Accessibility
When to use this skill
- When creating or modifying any UI component files (e.g.,
.tsx,.jsx,.vue,.sveltefiles) - When writing HTML or JSX markup for user interfaces
- When implementing forms with input fields, labels, and validation messages
- When building navigation menus, buttons, links, and interactive elements
- When creating modals, dialogs, tooltips, and overlay components
- When adding images, icons, or media content that needs alternative text
- When implementing keyboard navigation and focus management
- When using or adding ARIA attributes (aria-label, aria-describedby, role, etc.)
- When ensuring proper heading hierarchy (h1-h6) in page layouts
- When choosing colors and ensuring sufficient contrast ratios
- When testing components with screen readers
- When managing focus states for dynamic content and SPAs
- When reviewing components for WCAG compliance and accessibility standards
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.
Instructions
For details, refer to the information provided in this file: frontend accessibility