法律与合规
vue-a11y
Accessibility for Vue 3 apps. Semantic templates, ARIA patterns for modal, tabs, menu and combobox, focus management with Teleport and route changes, live announcements, accessible form errors, and automated checks with axe. Use when building UI components, reviewing accessibility, WCAG compliance, keyboard navigation or screen reader support.
KIMJINWOO4 · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add KIMJINWOO4/vue-skills --skill vue-a11y技能说明
name: vue-a11y description: Accessibility for Vue 3 apps. Semantic templates, ARIA patterns for modal, tabs, menu and combobox, focus management with Teleport and route changes, live announcements, accessible form errors, and automated checks with axe. Use when building UI components, reviewing accessibility, WCAG compliance, keyboard navigation or screen reader support.
Vue Accessibility
Target WCAG 2.2 AA. Order of preference: semantic HTML, then keyboard support, then focus management, then ARIA. A <button> beats a <div role="button" tabindex="0"> with three handlers.
Every component
- Anything interactive is focusable and works with the keyboard.
<button>,<a href>and<input>give you this for free. - Every input has a
<label>. Every image hasalt(alt=""when decorative). - Focus is visible. Never remove
outlinewithout a:focus-visiblereplacement. - Click targets are at least 24 by 24 CSS pixels. Color is never the only signal.
- Changes announce themselves: errors, async results and route changes use a live region or move focus.
Traps specific to Vue SPAs
| Trap | Fix |
|---|---|
| Route changes are silent for screen readers | Announce the new page and move focus; see focus-management |
| A Teleported modal lets focus escape behind it | Focus trap plus inert or aria-modal; see focus-management |
v-if swaps content without announcement | Live region, or focus the new content. VueUse 15 adds useLiveAnnouncer for polite and assertive messages |
| Hand-made dropdown, tab or menu widgets | Follow the ARIA pattern in aria-components, or use Reka UI primitives (vue-ui skill) |
| Validation errors shown only as red text | Wire aria-describedby and aria-invalid; see the vue-forms skill and aria-components |
References
| Topic | Path |
|---|---|
| Modal, tabs, menu, combobox, disclosure and toast patterns in Vue | aria-components |
| Teleport modals, focus traps, route announcements, skip links | focus-management |
| vitest-axe, Playwright audits, eslint-plugin-vuejs-accessibility | testing-a11y |