Accessibility wcag
Skill ComeOnOliver/skillshub/skills/aiskillstore/marketplace/doyajin174/accessibility-wcag
๐ง The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.
npx -y skills add ComeOnOliver/skillshub --skill accessibility-wcagAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Enforce WCAG 2.2 accessibility standards. Use when creating UI components, reviewing frontend code, or when accessibility issues are detected. Covers semantic HTML, ARIA, keyboard navigation, and color contrast.
The file declares its own license as MIT. That is the authorโs claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.2 KB, as published. Nobody here has run it
Accessibility (WCAG 2.2)
์น ์ ๊ทผ์ฑ ํ์ค WCAG 2.2๋ฅผ ์ค์ํ๋๋ก ๊ฐ์ ํ๋ ์คํฌ์ ๋๋ค.
2025 Context
WCAG 2.2๋ 2023๋ 10์ ISO ํ์ค(ISO/IEC 40500)์ผ๋ก ์ฑํ๋์์ต๋๋ค. ์ ๋ฝ ์ ๊ทผ์ฑ๋ฒ(EAA)์ 2025๋ 6์๋ถํฐ ์ํ๋ฉ๋๋ค.
Core Principles (POUR)
| ์์น | ์ค๋ช | ์์ |
|---|---|---|
| Perceivable | ์ธ์ง ๊ฐ๋ฅ | ๋์ฒด ํ ์คํธ, ์๋ง, ์์ ๋๋น |
| Operable | ์กฐ์ ๊ฐ๋ฅ | ํค๋ณด๋ ์ ๊ทผ, ์ถฉ๋ถํ ์๊ฐ |
| Understandable | ์ดํด ๊ฐ๋ฅ | ๋ช ํํ ์ธ์ด, ์์ธก ๊ฐ๋ฅํ ๋์ |
| Robust | ๊ฒฌ๊ณ ํจ | ๋ณด์กฐ ๊ธฐ์ ํธํ์ฑ |
Rules
1. Semantic HTML (ํ์)
// โ BAD: div ๋จ์ฉ
<div onClick={handleClick}>๋ฒํผ</div>
<div class="header">์ ๋ชฉ</div>
// โ
GOOD: ์๋งจํฑ ํ๊ทธ ์ฌ์ฉ
<button onClick={handleClick}>๋ฒํผ</button>
<h1>์ ๋ชฉ</h1>
2. ์ด๋ฏธ์ง ๋์ฒด ํ ์คํธ (ํ์)
// โ BAD: alt ๋๋ฝ ๋๋ ์๋ฏธ ์์
<img src="logo.png" />
<img src="chart.png" alt="์ด๋ฏธ์ง" />
// โ
GOOD: ์๋ฏธ ์๋ alt
<img src="logo.png" alt="ํ์ฌ๋ช
๋ก๊ณ " />
<img src="chart.png" alt="2024๋
๋งค์ถ ์ฆ๊ฐ ์ถ์ด ๊ทธ๋ํ" />
// โ
์ฅ์์ฉ ์ด๋ฏธ์ง๋ ๋น alt
<img src="decoration.png" alt="" role="presentation" />
3. ํค๋ณด๋ ์ ๊ทผ์ฑ (ํ์)
// โ BAD: ํค๋ณด๋ ์ ๊ทผ ๋ถ๊ฐ
<div onClick={handleClick} style={{ cursor: 'pointer' }}>
ํด๋ฆญ
</div>
// โ
GOOD: ํค๋ณด๋ ์ ๊ทผ ๊ฐ๋ฅ
<button onClick={handleClick}>ํด๋ฆญ</button>
// ๋๋ ์ปค์คํ
์์ ์ฌ์ฉ ์
<div
role="button"
tabIndex={0}
onClick={handleClick}
onKeyDown={(e) => e.key === 'Enter' && handleClick()}
>
ํด๋ฆญ
</div>
4. ํฌ์ปค์ค ๊ด๋ฆฌ
// โ BAD: ํฌ์ปค์ค ์คํ์ผ ์ ๊ฑฐ
button:focus {
outline: none;
}
// โ
GOOD: ๋ช
ํํ ํฌ์ปค์ค ํ์
button:focus {
outline: 2px solid #005fcc;
outline-offset: 2px;
}
button:focus-visible {
outline: 2px solid #005fcc;
}
5. ์์ ๋๋น (WCAG AA ๊ธฐ์ค)
| ํ ์คํธ ํฌ๊ธฐ | ์ต์ ๋๋น์จ |
|---|---|
| ์ผ๋ฐ ํ ์คํธ | 4.5:1 |
| ํฐ ํ ์คํธ (18pt+, 14pt bold+) | 3:1 |
| UI ์ปดํฌ๋ํธ/๊ทธ๋ํฝ | 3:1 |
/* โ BAD: ๋ฎ์ ๋๋น */
.text {
color: #999; /* ํ์ on ํฐ์ = 2.85:1 */
background: #fff;
}
/* โ
GOOD: ์ถฉ๋ถํ ๋๋น */
.text {
color: #595959; /* 4.54:1 */
background: #fff;
}
6. ํผ ๋ ์ด๋ธ (ํ์)
// โ BAD: ๋ ์ด๋ธ ์์
<input type="email" placeholder="์ด๋ฉ์ผ" />
// โ
GOOD: ๋ช
์์ ๋ ์ด๋ธ
<label htmlFor="email">์ด๋ฉ์ผ</label>
<input id="email" type="email" />
// ๋๋ aria-label ์ฌ์ฉ
<input type="email" aria-label="์ด๋ฉ์ผ ์ฃผ์" placeholder="์ด๋ฉ์ผ" />
7. ARIA ์ญํ ๋ฐ ์์ฑ
// ๋ชจ๋ฌ ๋ค์ด์ผ๋ก๊ทธ
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
>
<h2 id="modal-title">ํ์ธ</h2>
...
</div>
// ์๋ฆผ ๋ฉ์์ง
<div role="alert" aria-live="polite">
์ ์ฅ๋์์ต๋๋ค.
</div>
// ๋ก๋ฉ ์ํ
<button aria-busy={isLoading} disabled={isLoading}>
{isLoading ? '์ฒ๋ฆฌ ์ค...' : '์ ์ถ'}
</button>
8. ๊ฑด๋๋ฐ๊ธฐ ๋งํฌ
// ํ์ด์ง ์๋จ์ ์ถ๊ฐ
<a href="#main-content" className="skip-link">
๋ณธ๋ฌธ์ผ๋ก ๊ฑด๋๋ฐ๊ธฐ
</a>
// CSS
.skip-link {
position: absolute;
top: -40px;
left: 0;
z-index: 100;
}
.skip-link:focus {
top: 0;
}
WCAG 2.2 ์ ๊ท ๊ธฐ์ค
2.4.11 Focus Not Obscured (AA)
// โ BAD: ๊ณ ์ ํค๋๊ฐ ํฌ์ปค์ค ์์๋ฅผ ๊ฐ๋ฆผ
.header { position: fixed; top: 0; }
// โ
GOOD: scroll-margin์ผ๋ก ์ฌ์ ๊ณต๊ฐ ํ๋ณด
:target {
scroll-margin-top: 80px;
}
*:focus {
scroll-margin-top: 80px;
}
2.5.7 Dragging Movements (AA)
// โ BAD: ๋๋๊ทธ๋ง ์ง์
<DraggableList onDrag={handleReorder} />
// โ
GOOD: ๋๋๊ทธ + ๋ฒํผ ๋์ ์ ๊ณต
<DraggableList onDrag={handleReorder}>
<button onClick={moveUp}>์๋ก ์ด๋</button>
<button onClick={moveDown}>์๋๋ก ์ด๋</button>
</DraggableList>
2.5.8 Target Size (AA)
/* ์ต์ ํฐ์น ํ๊ฒ: 24x24px (AA), 44x44px ๊ถ์ฅ */
button, a, input[type="checkbox"] {
min-width: 44px;
min-height: 44px;
}
ํ ์คํธ ๋๊ตฌ
์๋ํ ๋๊ตฌ
# axe-core (React)
npm install @axe-core/react
# eslint-plugin-jsx-a11y
npm install eslint-plugin-jsx-a11y --save-dev
# Lighthouse CI
npm install -g @lhci/cli
lhci autorun
eslint ์ค์
{
"extends": ["plugin:jsx-a11y/recommended"],
"rules": {
"jsx-a11y/alt-text": "error",
"jsx-a11y/anchor-is-valid": "error",
"jsx-a11y/click-events-have-key-events": "error",
"jsx-a11y/no-static-element-interactions": "error"
}
}
์๋ ํ ์คํธ ์ฒดํฌ๋ฆฌ์คํธ
- ํค๋ณด๋๋ง์ผ๋ก ๋ชจ๋ ๊ธฐ๋ฅ ์ฌ์ฉ ๊ฐ๋ฅ
- Tab ์์๊ฐ ๋ ผ๋ฆฌ์
- ํฌ์ปค์ค ํ์๊ฐ ๋ช ํํจ
- ์คํฌ๋ฆฐ ๋ฆฌ๋๋ก ๋ด์ฉ ์ดํด ๊ฐ๋ฅ
- 200% ํ๋ํด๋ ์ฝํ ์ธ ์์ค ์์
- ์์๋ง์ผ๋ก ์ ๋ณด ์ ๋ฌํ์ง ์์
Workflow
1. ์ปดํฌ๋ํธ ์์ฑ ์
์ฒดํฌํฌ์ธํธ:
1. ์๋งจํฑ HTML ์ฌ์ฉํ๋๊ฐ?
2. ํค๋ณด๋ ์ ๊ทผ ๊ฐ๋ฅํ๊ฐ?
3. ์ ์ ํ ARIA ์์ฑ์ด ์๋๊ฐ?
4. ํฌ์ปค์ค ์คํ์ผ์ด ์๋๊ฐ?
2. ์ฝ๋ ๋ฆฌ๋ทฐ ์
์ ๊ทผ์ฑ ์ฒดํฌ:
1. img์ alt ์๋๊ฐ?
2. form์ label ์๋๊ฐ?
3. ์์ ๋๋น ์ถฉ๋ถํ๊ฐ?
4. ํฐ์น ํ๊ฒ ํฌ๊ธฐ ์ถฉ๋ถํ๊ฐ?
Checklist
- ์๋งจํฑ HTML ํ๊ทธ ์ฌ์ฉ
- ๋ชจ๋ ์ด๋ฏธ์ง์ ์๋ฏธ ์๋ alt
- ํผ ์์์ label ์ฐ๊ฒฐ
- ํค๋ณด๋๋ง์ผ๋ก ์กฐ์ ๊ฐ๋ฅ
- ํฌ์ปค์ค ํ์ ๋ช ํ
- ์์ ๋๋น 4.5:1 ์ด์
- ํฐ์น ํ๊ฒ 44x44px ์ด์
- ๊ฑด๋๋ฐ๊ธฐ ๋งํฌ ์ ๊ณต
- axe/Lighthouse ํ ์คํธ ํต๊ณผ