Skip to main content

setup-accessibility

Enforce ARIA accessibility via PostToolUse hooks -- labels, keyboard handlers, widget attributes, Playwright AXE setup. Use when setting up a11y enforcement, WCAG 2.1 AA compliance, or accessibility testing.

소스 정보

저장소
redpanda-data/ui-harness
최근 소스 활동
2026년 5월 8일 11:21
감지된 SKILL.md 언어
영어
스타
34
포크
4

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
4 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
setup-accessibility
description
Enforce ARIA accessibility via PostToolUse hooks -- labels, keyboard handlers, widget attributes, Playwright AXE setup. Use when setting up a11y enforcement, WCAG 2.1 AA compliance, or accessibility testing.
paths
["src/components/**/*.tsx"]
# Accessibility Enforcement ## What This Catches - **`<img>` without `alt`** -- use `alt=""` for decorative img - **Mouse-only `onClick` on `<div>`/`<span>`** -- needs `role` + `tabIndex` + `onKeyDown`/`onKeyUp` - **Missing ARIA on widget roles** -- `role="combobox"` needs `aria-expanded` + `aria-controls`, `role="dialog"` needs `aria-label`/`aria-labelledby`, `role="tablist"` needs child `role="tab"` Escape hatch: `// allow: a11y-skip [reason]` ## No Nested Pressables Interactive components ONE pattern -- never both: **Pattern A: Container clickable** -- no interactive children. ```tsx <ListCard onClick={handleSelect}> <Avatar src={user.avatar} /> <Text>{user.name}</Text> <ChevronRightIcon /> {/* visual indicator only, not a button */} </ListCard> ``` **Pattern B: Children interactive** -- container not clickable. ```tsx <ListCard> <Avatar src={user.avatar} /> <Text>{user.name}</Text> <DropdownMenu> <DropdownMenuTrigger asChild> <Button variant="ghost" size="icon"><MoreVerticalIcon /></Button> </DropdownMenuTrigger> </DropdownMenu> </ListCard> ``` Why: ambiguous click targets, event bubbling bugs, screen readers can't convey interaction model, touch targets overlap on mobile. ## Visual Checklist - [ ] Focus rings visible on all interactive elements (min 2px, contrasting color) - [ ] Hover and focus styles match (no mouse-only affordances) - [ ] Color not sole means of conveying info - [ ] Touch targets min 44x44 CSS pixels - [ ] `prefers-reduced-motion` respected for animations - [ ] `forced-colors` / high-contrast mode: use `currentcolor` for SVG fills - [ ] Text resizable to 200% without content loss Initial setup (install, AXE fixture, hook config): see [SETUP.md](SETUP.md).
GitHub에서 보기