一键导入
a11y-audit
Audit components for accessibility. Use when asked to create or update an accessibility audit or A11y.mdx file for a React component.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Audit components for accessibility. Use when asked to create or update an accessibility audit or A11y.mdx file for a React component.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | a11y-audit |
| description | Audit components for accessibility. Use when asked to create or update an accessibility audit or A11y.mdx file for a React component. |
Before doing anything else you must identify what kind of component you're auditing. If the component name is not self-explanatory, you can read its source file(s) or test files to understand what the component does and associate it with a well-known component type.
Once you have identified the component, tell the user a few words about this component and what it does, then move on to step 2.
Given the type of component to audit, browse the WAI-ARIA Authoring Practices and see if there is an existing ARIA Pattern for the component, or guidelines for implementing ARIA roles, states, and properties
Tell the user if you found something and keep this reference for later.
Important: Take all the time you need for this step, it is crucial that you don't miss any rules. It is better to have too many rules than to miss relevant ones.
Given the type of component to audit, use the WCAP MCP to find relevent rules that apply to the component.
Important: Start skeptical. Assume the React component has accessibility issues until proven otherwise.
Read the component file(s) to understand:
Based on the ARIA pattern and WCAG rules that you found in previous steps, identify any accessibility issues or missing features. Be as comprehensive as possible.
A11y.mdx fileCreate a file path/to/component/__stories__/A11y.mdx following the template .agents/skills/a11y-audit/resources/audit-template.mdx. You can find the "Component Path" in the stories path/to/component/__stories__/index.stories.tsx.
Fill the A11y.mdx file with your findings from the previous step and following indications in the template file. You can find an example of a full A11y.mdx file in .agents/skills/a11y-audit/resources/audit-example.mdx.
Update the path/to/component/__stories__/index.stories.tsx file and complete or update the a11yStatus parameter.
import type { Meta } from '@storybook/react-vite'
import { Component } from '..'
export default {
component: Component,
title: 'UI/Category/Component',
parameters: {
a11yStatus: {
perceivable: true | false,
operable: true | false,
understandable: true | false,
robust: true | false,
},
},
} satisfies Meta<typeof Component>
Set a11yStatus flags based on the WCAG rules identified earlier:
perceivable: false if at least one rule with index 1.x.x fails, otherwise trueoperable: false if at least one rule with index 2.x.x fails, otherwise trueunderstandable: false if at least one rule with index 3.x.x fails, otherwise truerobust: false if at least one rule with index 4.x.x fails, otherwise trueAfter analyzing a component, provide a short summary with:
If issues found, suggest a ticket:
**Title**: [A11Y] Fix [Component]
**Description**:
- Critical issues: ...
- Dependencies: [list or "none"]
- Estimated effort: [XS/S/M/L/XL]
**Acceptance rules**:
- [ ] Keyboard navigation works (Tab, Enter, Escape)
- [ ] Screen readers announce component correctly
- [ ] Focus is visible and managed properly
- [ ] ARIA attributes are correct