SKILL

frontend-a11y

React 和 Next.js 的无障碍模式:语义化 HTML、ARIA 属性、表单标签、键盘导航、焦点管理和屏幕阅读器支持。适用于构建或审查表单、模态框、下拉菜单、提示框和标签页,修复无障碍(a11y)lint 或代码审查问题,以及接入键盘导航和焦点管理。

译文已校对
查看英文原文

Accessibility patterns for React and Next.js — semantic HTML, ARIA attributes, form labeling, keyboard navigation, focus management, and screen reader support. Use when building or reviewing forms, modals, dropdowns, tooltips, or tabs, fixing a11y lint or code-review findings, or wiring up keyboard navigation and focus management.

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Frontend Accessibility Patterns
  • When to Activate
  • Form Accessibility
  • Label Connection
  • Required Fields
  • Error Messages
  • Complete Accessible Form
  • Semantic HTML

Practical accessibility patterns for React and Next.js. Covers the issues most commonly flagged in code review: missing form labels, incorrect ARIA usage, non-semantic interactive elements, and broken keyboard navigation. Building or reviewing form components ( , , ) Creating interactive elements (modals, dropdowns, tooltips, tabs) Using or with onClick Adding aria- attributes to any element Implementing keyboard navigation or focus management Receiving accessibility feedback from code review tools (CodeRabbit, ESLint a11y) Building components that must support screen readers Missing htmlFor / id pairing and disconnected error messages are the most common issues flagged in code review. Use the element that matches the intent. Screen readers and keyboard users depend on native semantics. Use ARIA only when native HTML semantics are insufficient. Wrong ARIA is worse than no ARIA. Every interactive element must be reachable and operable by keyboard alone. Focus must move logically when UI state changes — especially for modals and route transitions. This example covers initial focus and restoration. For a full focus trap (Tab/Shift+Tab cycling within the modal), use a library like focu

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
affaan-m/ECC
源文件
pi/core/skills/frontend-a11y/SKILL.md
固定版本
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.017Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。