Raw view: Accessibility Audit of a UI Component
No invisible, zero-width, or bidi-control characters detected.
Audit the UI component below for accessibility against WCAG 2.2 at level {{TARGET_LEVEL}} (default AA if empty). The audience is the engineer who will fix it, so each finding needs a success criterion, what a real user experiences, and the code change.
<component>
<purpose>{{COMPONENT_PURPOSE}}</purpose>
<framework>{{FRAMEWORK}}</framework>
<code>
{{COMPONENT_CODE}}
</code>
</component>
<design_tokens>
{{DESIGN_TOKENS}}
</design_tokens>
<purpose> is what the component does for the user (for example, "date range picker inside a filter bar"). <design_tokens> may hold colors, font sizes, and spacing values; use them for contrast and target-size checks. If a value needed for a check is absent, report the check as `needs verification` with the exact measurement to take, rather than guessing.
Audit in this order, reading the code once per pass:
1. Semantics. Is the native element right for the job (a `<button>` for actions, `<a href>` for navigation, a real `<label>` for inputs)? Only where native semantics are impossible, check that ARIA roles, states, and properties are complete and valid together (a `role="tab"` without `aria-selected` and a `tablist` parent is incomplete).
2. Name, role, value. For every interactive element, determine what a screen reader would announce. Quote the computed accessible name if it can be derived from the code; flag anything that would announce as "button" or "clickable" with no name.
3. Keyboard. Trace tab order and the keys the component handles. Check: reachable by Tab, operable with Enter/Space (and arrows where the pattern calls for them), no keyboard trap, visible focus indicator, focus managed on open/close for overlays.
4. State and feedback. Expanded/collapsed, selected, invalid, loading, and error states must be exposed programmatically, not only visually. Live regions for async results; error messages associated with their input via `aria-describedby`.
5. Visual. Contrast of text and UI boundaries against <design_tokens> (4.5:1 normal text, 3:1 large text and UI components at AA), target size (24x24 CSS px minimum at 2.2 AA), reliance on color alone, motion that cannot be reduced, and text that breaks at 200% zoom.
6. Pointer and touch. Dragging alternatives (2.5.7), pointer cancellation, hover content that can be dismissed and persisted.
Cite the WCAG criterion number and name for each finding (for example, `4.1.2 Name, Role, Value`). Severity: `critical` blocks a task for an assistive-tech user, `serious` makes it very hard, `moderate` degrades it, `minor` is friction.
## Output format
**Summary** - one sentence on whether the component is usable by keyboard and screen reader today, and the count of findings by severity.
**Findings** - table with columns: severity, WCAG criterion, element (quote the tag or selector), what the user experiences, fix. Sort by severity. Keep "what the user experiences" concrete: "VoiceOver announces 'button' with no label" not "missing accessible name".
**Fixes** - for every `critical` and `serious` finding, a fenced code block showing the corrected markup or handler in {{FRAMEWORK}}, minimal and ready to paste.
**Needs verification** - checks that require a running browser or values not in the inputs, each with the exact test to run (tool, steps, expected result).
**Passes** - criteria you checked and found compliant, as a compact list, so the team knows what was covered.