All resources
AccessibilityBeginner1 min read

Accessible Components Checklist

A practical checklist for semantics, keyboard support, names, contrast and motion before you ship a component.

Start with the right element

Native elements come with keyboard support, focus and screen reader semantics for free. Reach for ARIA only when no element fits.

If it…UseNot
performs an action<button type="button"><div onClick>
navigates somewhere<a href><button onClick={navigate}>
toggles on/off<button role="switch" aria-checked>A styled checkbox without a label
groups page regions<nav>, <main>, <aside>Generic <div> wrappers

Keyboard and focus

  • Every interactive element is reachable with Tab and activates with Enter or Space.
  • Focus is always visible: prefer focus-visible rings over removing outlines.
  • Dialogs trap focus while open and return it to the trigger when closed.
  • Escape closes popovers, menus and dialogs.
  • Tab order follows the visual order; avoid positive tabindex values.
TSX
<button className="rounded-lg px-3 py-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500">  Save changes</button>

Give everything an accessible name

Icon-only buttons are the most common gap. A visible tooltip is not an accessible name — add aria-label or visually hidden text.

TSX
<button type="button" aria-label="Copy code">  <CopyIcon aria-hidden="true" /></button><label htmlFor="email">Email</label><input id="email" type="email" autoComplete="email" />

Color and contrast

ContentMinimum ratio (WCAG AA)
Body text4.5 : 1
Large text (24px, or 18.66px bold)3 : 1
Icons, borders and focus indicators3 : 1

Never use color alone to convey meaning: pair a red border with an error message and an icon.

Respect reduced motion

CSS
@media (prefers-reduced-motion: reduce) {  *,  *::before,  *::after {    animation-duration: 0.01ms !important;    transition-duration: 0.01ms !important;    scroll-behavior: auto !important;  }}

In Tailwind, prefix animations with motion-safe: so they only run for people who have not asked to reduce motion.