---
name: building-accessible-interfaces
description: Use when building or auditing any web UI for accessibility — keyboard navigation, screen readers, focus management, ARIA, color contrast, form labels and error announcements, reduced motion, or touch target size. Triggers include "is this accessible", "WCAG", "a11y", "screen reader", "keyboard navigation", "focus trap", "contrast ratio", "aria-label", or building modals, menus, tabs, comboboxes, toasts, and custom controls that must work without a mouse.
---
# Building Accessible Interfaces
## Overview
Accessibility is not a pass applied at the end. Almost every accessibility defect is a structural decision — a `div` that should have been a `button`, a state communicated only in color, a modal that never moved focus — and structural decisions are expensive to reverse.
**Core principle:** Native semantic HTML is accessible by default. Every layer you add on top of it is a layer you now own the accessibility of.
Target: **WCAG 2.2 Level AA**.
## The Iron Law
```
NO CUSTOM CONTROL WHERE A NATIVE ELEMENT EXISTS
```
A `
` needs a role, a tabindex, key handlers for Enter and Space, a focus style, and a disabled state. A `