accessibility은(는) 무엇을 하나요?
Two walks: keyboard-only (every flow completes without a pointer), then screen reader (every control announces name, role and state). When unsure, take the platform default over a custom rebuild, and remove ARIA rather than add it. A finding cites a WCAG 2.2 A/AA criterion or a concrete task an assistive-tech user can't complete; everything else is a recommendation.
Native first
<button>for actions,<a href>for navigation (Cmd/middle-click must work), never<div onClick>.- Use the primitive library (shadcn/Base UI/Radix) for dialogs, menus, selects, comboboxes — focus management and key maps come free.
- Native:
PressablewithaccessibilityRole="button"andaccessibilityLabel;accessibilityState={{ selected, disabled, checked }}.
Focus
focus-visible:rings, not barefocus:. A custom ring reaches 3:1 against what it crosses:focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent. Neveroutline-nonewithout a replacement.- Focused elements never hide under sticky chrome (
scroll-pt-*). - Dialogs:
<dialog>withshowModal()or the primitive; background inert, focus moves in on open and returns to the trigger on close; Escape closes. - Client-side route change: update
document.title, move focus to the new<h1>or<main>. tabIndexonly0or-1. Composite widgets use roving tabindex oraria-activedescendant.
Keyboard
Every pointer interaction has a keyboard path: Escape closes overlays, arrows move inside composite widgets, Tab moves between widgets, Enter/Space activate. Every drag has a single-pointer alternative (buttons or a menu that move the item) (2.5.7).
Targets
24×24 CSS px minimum (2.5.8); aim for 44×44 on touch, 40×40 on desktop. Extend invisibly with a pseudo-element (relative after:absolute after:-inset-2) or hitSlop on native. Extended areas never overlap; decorative layers get pointer-events-none.
Forms
- Every input has a
<label>. Placeholder is never a label. Label and control share one hit target. autocomplete,name,type,inputmodeon every field about the user. Never block paste.- Validate on submit (and on blur for format), never by disabling submit until valid. Mark
aria-invalid="true", pointaria-describedbyat the inline error, focus the first invalid field. - Known requirements shown as helper text before input.
Names and announcements
- Icon-only buttons:
aria-labelnaming the action ("Delete project"), and the visible label text must appear in the accessible name. - Decorative elements
aria-hidden="true"(never on something focusable). Decorative imagesalt=""; informative images describe meaning; functional images describe the action. aria-describedbyfor field errors; a polite live region (role="status", rendered empty first) for toasts and result counts;role="alert"only for urgent untied errors.- Native:
AccessibilityInfo.announceForAccessibilityfor status changes.
Color and contrast
| Criterion | Applies to | Minimum |
|---|---|---|
| 1.4.3 | Text | 4.5:1 |
| 1.4.3 | Large text (≥ 24px or ≥ 18.67px bold) | 3:1 |
| 1.4.11 | UI boundaries, states, meaningful graphics | 3:1 |
Status never by color alone (1.4.1). Measure with color-system.
Motion and time
- Movement, scale and blur are opt-in under
motion-safe:; under reduced motion use opacity cross-fades; kill parallax and autoplay. Native:useReducedMotion(). - Moving or auto-updating content lasting > 5s gets a pause control (2.2.2). Toasts with actions or errors stay until dismissed.
- A state change carried by motion alone must leave a color, icon or label behind.
Structure and zoom
- Headings form a coherent outline; one
<main>; a "Skip to content" link when navigation precedes it. Setlang. - Text survives 200% resize (1.4.4); reflow at 320px without horizontal scroll (1.4.10). Never
maximum-scale=1. - Native: layouts survive the largest Dynamic Type size.
Escalation triggers (always HIGH)
Unnamed interactive control · no visible focus · pointer-only path · motion ignoring reduced motion · clipped/unreachable at 320px or 200% · failing text contrast · meaning by color alone · destructive action with no confirm/undo · truncated content with no way to the full value · error with no recovery path.
Before you finish
| Pattern | Fix |
|---|---|
outline-none with no focus-visible replacement | restore a ring |
<div onClick> | <button> / <a href> |
role="button" without key handling | native element |
positive tabIndex | fix DOM order |
disabled={!isValid} on submit | validate on submit |
| region mounted together with its message | render empty region first |
aria-live="assertive" on a success toast | role="status" |
<img> with no alt | alt="" or describe purpose |
| tooltip on a natively disabled control | text beside it or aria-disabled |
| drag with no button alternative | add one |
Verification: with a browser, tab the flow, read names/roles from the accessibility tree, run an automated audit (axe). Report what you couldn't run as Not verified.