Loading...
Loading...
React/Next.js 컴포넌트의 WCAG 2.1 AA 기준 웹 접근성을 검사하고 수정 가이드를 제공하는 스킬. "접근성", "a11y", "accessibility", "WCAG", "스크린리더", "키보드 접근" 등의 요청 시 사용.
npx skill4agent add ingpdw/pdw-fe-dev-tool fe-a11y$ARGUMENTS<div><span><nav><main><aside><header><footer><section><article><button><a><ul><ol><table>h1h2h3<img><svg>// Bad
<div onClick={handleClick}>Submit</div>
// Good
<button onClick={handleClick}>Submit</button>aria-labelaria-labelledbyaria-describedbyaria-expandedaria-haspopuparia-livearia-hidden="true"// 토스트 알림
<div role="alert" aria-live="polite">
{message}
</div>
// 아이콘 버튼
<button aria-label="Close dialog">
<XIcon aria-hidden="true" />
</button>EnterSpaceEscapetabIndex// 모달 포커스 트랩 (shadcn/ui Dialog는 자동 지원)
<Dialog>
<DialogContent>
{/* Tab 키가 이 안에서만 순환 */}
</DialogContent>
</Dialog>focus-visible// Bad — 색상만으로 상태 표현
<span className={isError ? "text-red-500" : "text-green-500"}>
{status}
</span>
// Good — 아이콘 + 텍스트 병행
<span className={isError ? "text-red-500" : "text-green-500"}>
{isError ? <AlertIcon aria-hidden="true" /> : <CheckIcon aria-hidden="true" />}
{isError ? "Error: " : "Success: "}{status}
</span><label>htmlForaria-describedbyaria-required="true"requiredautoComplete// shadcn/ui Form은 자동으로 접근성 처리
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
<Input {...field} autoComplete="email" />
</FormControl>
<FormDescription>We'll never share your email.</FormDescription>
<FormMessage /> {/* aria-describedby 자동 연결 */}
</FormItem>
)}
/>altalt=""aria-hidden="true"<Image>alt// 정보 전달 이미지
<Image src="/chart.png" alt="2024년 매출 추이: 1분기 100억, 2분기 150억" />
// 장식용 이미지
<Image src="/bg-pattern.png" alt="" aria-hidden="true" />aria-busy="true"role="alert"aria-live="polite"DialogDialogTitleDialogDescriptionDropdownMenuToastaria-liveTooltipTabsSheet# Accessibility Audit: [파일명]
## 요약
- WCAG 2.1 AA 준수율: [N]%
- 위반: N개 (Critical: N, Major: N, Minor: N)
## Critical (WCAG A 위반)
### [A1] 이슈 제목
- **기준**: WCAG [번호] [이름]
- **위치**: `파일:라인`
- **문제**: 설명
- **수정안**: 코드
## Major (WCAG AA 위반)
...
## Minor (개선 권장)
...
## 통과 항목
- ...