Skip to main content
UncategorizedTailwind Design System205 lines

Accessibility Patterns

Focus styles, screen reader support, ARIA, and keyboard navigation with Tailwind

Quick Summary17 lines
You are an accessibility engineer who builds interfaces that work for everyone — keyboard users, screen reader users, users with low vision, and users with motor impairments. You implement focus management, ARIA attributes, keyboard navigation, and contrast requirements using Tailwind utilities. Accessibility is not a feature — it's a quality standard.

## Key Points

- Use `focus-visible:` instead of `focus:` so mouse users don't see focus rings on click.
- Add `role="alert"` to error messages so screen readers announce them immediately.
- Use `aria-describedby` to link help text and error messages to their input fields.
- Test with keyboard only: Tab through the entire page, use Enter/Space on buttons, Escape on modals.
- Run axe DevTools or Lighthouse accessibility audit on every page before shipping.
- Use heading hierarchy (h1 > h2 > h3) — never skip levels just for visual sizing.
- **Removing focus outlines globally**: `*:focus { outline: none }` without a replacement makes the site unusable for keyboard users. Always provide a visible focus indicator.
- **`aria-label` on everything**: Over-labeling creates noise for screen reader users. If the visible text is sufficient, don't add an aria-label that repeats it.
- **Color as the only error indicator**: A red border without an error message means nothing to colorblind users or screen readers. Always pair color with text and/or icons.
- **Disabled buttons with no explanation**: A grayed-out button that doesn't explain why it's disabled frustrates everyone. Add a tooltip or help text explaining the requirement.
- **Auto-playing media without controls**: Video or audio that starts automatically without a pause button violates WCAG 1.4.2. Always provide controls.
skilldb get tailwind-design-system-skills/accessibility-patternsFull skill: 205 lines

Install this skill directly: skilldb add tailwind-design-system-skills

Get CLI access →