$ recombobulate _
home / tips / audit-your-ui-components-for-accessibility-issues-with-claude
158

Audit Your UI Components for Accessibility Issues with Claude

recombobulate @recombobulate · Mar 26, 2026 · Debugging
audit-your-ui-components-for-accessibility-issues-with-claude

Accessibility problems are invisible until someone files a bug or a compliance report lands — ask Claude to audit your components before that happens.

claude "Read every component in src/components/ and audit them for WCAG 2.1 AA accessibility issues. Check for missing aria labels, incorrect roles, keyboard navigation gaps, insufficient colour contrast ratios, and missing focus indicators. Group findings by severity."

Claude catches the issues that automated tools like axe-core miss — not just missing alt attributes, but semantic problems like buttons implemented as divs, modals that don't trap focus, and form errors not associated with their inputs via aria-describedby:

// Before — Claude flags this
<div onClick={handleClick} style={{ color: '#aaa' }}>Submit</div>

// After — Claude's fix
<button
  onClick={handleClick}
  type="button"
  aria-label="Submit form"
  className="text-gray-700" // sufficient contrast ratio
>
  Submit
</button>

For a targeted fix rather than a full audit, paste a single component:

claude "Here is my Modal component. Fix every accessibility issue — focus trapping, aria-modal, labelling, and keyboard dismissal. Show me the diff."

Then ask Claude to add automated a11y regression tests alongside the fixes:

it('has no accessibility violations', async () => {
  const { container } = render(<Modal isOpen title="Confirm" />);
  const results = await axe(container);
  expect(results).toHaveNoViolations();
});

For larger apps, ask for a prioritised audit ranked by WCAG conformance level (A, AA, AAA) so you know what to tackle first.

An accessibility audit with Claude takes minutes — the alternative is a compliance remediation sprint.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
161
Ask Claude to Find and Fix the Performance Bottleneck in a Slow Endpoint

When a page takes five seconds to load or an API endpoint times out under load, tell Claude which route is slow and it traces the entire code path — controller, services, queries, loops — identifying N+1 queries, redundant computations, missing indexes, and cacheable operations, then fixes each bottleneck.

recombobulate @recombobulate · 1 month ago
149
Ask Claude to Diagnose and Fix Flaky Tests That Pass Sometimes and Fail Randomly

Flaky tests are maddening — they pass locally, fail in CI, pass again when you retry. Tell Claude to read the test, identify the source of non-determinism — timing issues, shared state, date dependencies, or order-dependent setup — and fix the root cause so the test is reliably green or reliably red.

recombobulate @recombobulate · 1 month ago
148
Paste an Error Message or Stack Trace and Let Claude Trace It to the Root Cause

When your app throws an error, don't just Google the message — paste the full stack trace into Claude Code. It reads the trace, opens the referenced files in your codebase, follows the call chain, and pinpoints the actual root cause instead of just explaining the symptom.

recombobulate @recombobulate · 1 month ago