frontend-accessibility
使用语义 HTML、键盘导航、适当的颜色对比度、ARIA 属性和屏幕阅读器支持构建可访问的用户界面。在创建或修改前端 UI 组件、HTML 模板、JSX/TSX 文件、表单、交互元素、模式、导航菜单或任何面向用户的界面代码时使用此技能。在确保键盘可访问性、添加 ARIA 标签和角色、为图像提供替代文本、管理焦点状态、实现正确的标题层次结构、使用屏幕阅读器进行测试或确保足够的颜色对比度时使用此功能。在处理 .jsx、.tsx、.vue、.html 或渲染 UI 元素的组件文件时使用此选项。
📖 中文导读:使用语义 HTML、键盘导航、适当的颜色对比度、ARIA 属性和屏幕阅读器支持构建可访问的用户界面。在创建或修改前端 UI 组件、HTML 模板、JSX/TSX 文件、表单、交互元素、模式、导航菜单或任何面向用户的界面代码时使用此技能。在确保键盘可访问性、添加 ARIA 标签和角色、为图像提供替代文本、管理焦点状态、实现正确的标题层次结构、使用屏幕阅读器进行测试或确保足够的颜色对比度时使用此功能。在处理 .jsx、.tsx、.vue、.html 或渲染 UI 元素的组件文件时使用此选项。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Frontend Accessibility description: Build accessible user interfaces with semantic HTML, keyboard navigation, proper color contrast, ARIA attributes, and screen reader support. Use this skill when creating or modifying frontend UI components, HTML templates, JSX/TSX files, forms, interactive elements, modals, navigation menus, or any user-facing interface code. Use this when ensuring keyboard accessibility, adding ARIA labels and roles, providing alt text for images, managing focus states, implementing proper heading hierarchy, testing with screen readers, or ensuring sufficient color contrast ratios. Use this when working on .jsx, .tsx, .vue, .html, or component files that render UI elements.
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 UI component files (.jsx, .tsx, .vue, .html, .svelte)
- When building forms, buttons, links, or any interactive user interface elements
- When implementing keyboard navigation and visible focus indicators
- When adding ARIA attributes (aria-label, aria-describedby, role) to enhance accessibility
- When providing alternative text for images and meaningful labels for form inputs
- When ensuring proper color contrast ratios (minimum 4.5:1 for normal text)
- When creating proper heading structure (h1-h6) in logical order
- When managing focus in dynamic content, modals, dialogs, or single-page applications
- When using semantic HTML elements (nav, main, button, article, section, header, footer)
- When testing and verifying that interfaces work with screen readers
- When building navigation menus, dropdown menus, or complex interactive widgets
Instructions
For details, refer to the information provided in this file: frontend accessibility