AgentSkillsCN

Frontend Accessibility

构建无障碍用户界面,使用语义 HTML、键盘导航、ARIA 属性和屏幕阅读器支持。在创建或修改 UI 组件、表单元素、交互式小部件,或页面布局时使用此技能。在 *.tsx、*.jsx、*.vue、*.svelte,或 HTML 模板文件中工作时使用。在为图片添加替代文本、为表单输入添加标签、实现键盘导航、管理焦点状态、确保合适的颜色对比、使用语义 HTML 元素(nav、main、button),或为复杂组件添加 ARIA 属性时使用。

SKILL.md
--- frontmatter
name: Frontend Accessibility
description: Build accessible user interfaces with semantic HTML, keyboard navigation, ARIA attributes, and screen reader support. Use this skill when creating or modifying UI components, form elements, interactive widgets, or page layouts. When working on files like *.tsx, *.jsx, *.vue, *.svelte, or HTML templates. When adding alt text to images, labels to form inputs, implementing keyboard navigation, managing focus states, ensuring proper color contrast, using semantic HTML elements (nav, main, button), or adding ARIA attributes for complex components.

When to use this skill:

  • When creating new UI components or interactive elements
  • When modifying existing frontend components
  • When working on files like *.tsx, *.jsx, *.vue, *.svelte, or HTML templates
  • When adding images that need alternative text
  • When creating form inputs that need labels
  • When implementing keyboard navigation for interactive elements
  • When adding or styling focus indicators
  • When checking or setting color contrast ratios
  • When choosing between semantic HTML elements (nav, main, article, button)
  • When adding ARIA attributes (aria-label, aria-describedby, role)
  • When managing focus in modals, dialogs, or single-page applications
  • When structuring heading levels (h1-h6) for document outline
  • When testing with screen readers or accessibility tools

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.

Instructions

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