Accessibility Change Audit
Brief purpose: review UI changes for accessibility regressions and missing improvements, then propose minimal fixes tied to the diff.
Overview
This skill audits UI diffs for semantics, keyboard access, focus management, ARIA correctness, contrast, and testability. It is diff-first: only evaluate changed lines and their immediate context.
Prerequisites
- A diff, PR, or change list that includes relevant UI files.
- Optional: a screenshot or description of the changed UI state.
Instructions
Step 1: Scope the audit to the diff
Identify changed UI elements, interactions, and styles. Ignore unrelated files.
Step 2: Run the diff-first checklist
Focus on changes that alter semantics, interaction, or visual affordances.
Step 3: Produce findings and minimal fixes
Tie each issue to a specific change and propose the smallest reasonable fix.
Step 4: Improve test reliability
Recommend role- and name-based queries for tests instead of data or class selectors.
Audit Checklist (Diff-First)
Semantics and structure
- Headings follow order and are not skipped.
- Interactive elements are buttons/links, not divs/spans.
- Landmarks are present for new regions (main, nav, header, footer, aside).
- Lists and tables use correct elements (ul/ol/li, th/thead/tbody).
Labels and names
- Inputs have labels or aria-label/aria-labelledby.
- Icon-only controls have accessible names.
- Helper text ties to inputs via aria-describedby.
Keyboard and focus
- All interactive elements are keyboard reachable and operable.
- Focus order follows DOM order (avoid tabIndex > 0).
- Dialogs/menus trap focus and return focus to trigger.
ARIA correctness
- ARIA only when native semantics are insufficient.
- aria-expanded/controls/pressed reflect actual state.
- role is correct and not redundant.
Visual and motion
- Text and focus indicators meet contrast requirements.
- Color is not the only indicator.
- Motion respects reduced-motion preferences.
Media and imagery
- Images have meaningful alt or empty alt for decorative.
- Media controls are accessible and labeled.
Testing reliability
- New elements can be found by role and accessible name.
- Interaction tests use user flows and semantic queries.
Minimal Fix Patterns
- Icon-only button
- Add visible text or aria-label.
- Clickable non-button
- Convert to or add role="button", tabIndex=0, and Enter/Space handling.
- Form label
- Add or aria-labelledby and connect helper text with aria-describedby.
- Disclosure
- Toggle uses aria-expanded and aria-controls; update on state change.
- Dialog
- Use role="dialog", aria-modal, label by heading, and return focus on close.
Output Format
Findings (ordered by severity):
- [severity] path:line - problem and impact
Fix: minimal change suggestion
Tests:
- Recommend updates that use role/name queries and user-driven events.
UX/Speed Note:
- Call out any change that impacts perceived speed (layout shifts, heavy DOM, over-rendering).
Severity scale: blocker, high, medium, low.
Example Review Output
Findings:
- high
packages/web/src/views/Example.tsx:42 - Clickable div lacks keyboard support; keyboard users cannot activate it.
Fix: convert to or add role, tabIndex, and Enter/Space handlers.
- medium
packages/web/src/views/Example.tsx:60 - Icon-only control has no accessible name.
Fix: add aria-label="Add event".
Tests:
- Add a role-based query: getByRole("button", { name: /add event/i }).
UX/Speed Note:
- No layout shift detected; DOM complexity unchanged.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: codex-a11y-audit3description: Use when reviewing UI diffs, accessibility audits, or flaky UI tests to catch a11y regressions, semantic issues, keyboard/focus problems, and to recommend minimal fixes plus role-based test selectors.4---56# Accessibility Change Audit78Brief purpose: review UI changes for accessibility regressions and missing improvements, then propose minimal fixes tied to the diff.910## Overview1112This skill audits UI diffs for semantics, keyboard access, focus management, ARIA correctness, contrast, and testability. It is diff-first: only evaluate changed lines and their immediate context.1314## Prerequisites1516- A diff, PR, or change list that includes relevant UI files.17- Optional: a screenshot or description of the changed UI state.1819## Instructions2021### Step 1: Scope the audit to the diff2223Identify changed UI elements, interactions, and styles. Ignore unrelated files.2425### Step 2: Run the diff-first checklist2627Focus on changes that alter semantics, interaction, or visual affordances.2829### Step 3: Produce findings and minimal fixes3031Tie each issue to a specific change and propose the smallest reasonable fix.3233### Step 4: Improve test reliability3435Recommend role- and name-based queries for tests instead of data or class selectors.3637## Audit Checklist (Diff-First)3839Semantics and structure4041- Headings follow order and are not skipped.42- Interactive elements are buttons/links, not divs/spans.43- Landmarks are present for new regions (main, nav, header, footer, aside).44- Lists and tables use correct elements (ul/ol/li, th/thead/tbody).4546Labels and names4748- Inputs have labels or aria-label/aria-labelledby.49- Icon-only controls have accessible names.50- Helper text ties to inputs via aria-describedby.5152Keyboard and focus5354- All interactive elements are keyboard reachable and operable.55- Focus order follows DOM order (avoid tabIndex > 0).56- Dialogs/menus trap focus and return focus to trigger.5758ARIA correctness5960- ARIA only when native semantics are insufficient.61- aria-expanded/controls/pressed reflect actual state.62- role is correct and not redundant.6364Visual and motion6566- Text and focus indicators meet contrast requirements.67- Color is not the only indicator.68- Motion respects reduced-motion preferences.6970Media and imagery7172- Images have meaningful alt or empty alt for decorative.73- Media controls are accessible and labeled.7475Testing reliability7677- New elements can be found by role and accessible name.78- Interaction tests use user flows and semantic queries.7980## Minimal Fix Patterns81821. Icon-only button8384- Add visible text or aria-label.85862. Clickable non-button8788- Convert to <button> or add role="button", tabIndex=0, and Enter/Space handling.89903. Form label9192- Add <label htmlFor> or aria-labelledby and connect helper text with aria-describedby.93944. Disclosure9596- Toggle uses aria-expanded and aria-controls; update on state change.97985. Dialog99100- Use role="dialog", aria-modal, label by heading, and return focus on close.101102## Output Format103104Findings (ordered by severity):105106- [severity] path:line - problem and impact107 Fix: minimal change suggestion108109Tests:110111- Recommend updates that use role/name queries and user-driven events.112113UX/Speed Note:114115- Call out any change that impacts perceived speed (layout shifts, heavy DOM, over-rendering).116117Severity scale: blocker, high, medium, low.118119## Example Review Output120121Findings:122123- high `packages/web/src/views/Example.tsx:42` - Clickable div lacks keyboard support; keyboard users cannot activate it.124 Fix: convert to <button type="button"> or add role, tabIndex, and Enter/Space handlers.125- medium `packages/web/src/views/Example.tsx:60` - Icon-only control has no accessible name.126 Fix: add aria-label="Add event".127128Tests:129130- Add a role-based query: getByRole("button", { name: /add event/i }).131132UX/Speed Note:133134- No layout shift detected; DOM complexity unchanged.135136---137> Converted and distributed by [TomeVault](https://tomevault.io/claim/switchbacktech) — claim your Tome and manage your conversions.138<!-- tomevault:4.0:skill_md:2026-04-11 -->