Accessibility & Responsive Prompts

Make accessibility and responsiveness explicit requirements so AI builds inclusive, adaptive UI instead of div-soup you retrofit.

TL;DR

  1. Accessibility and responsiveness are requirements, not polish; state them in the prompt from the start.
  2. Require semantic HTML, keyboard operability, labels, focus management, and sufficient contrast.
  3. Ask for mobile-first, adaptive layouts and verify with real checks, not just a glance.

Make It A Requirement

    Name The Standard

    State the target so expectations are concrete.

    "Meet WCAG 2.2 AA."
    From The Start

    Put accessibility in the first prompt, not a later cleanup.

    "Accessible by default, not retrofit."
    List The Specifics

    Spell out roles, labels, focus, and contrast so nothing is vague.

    "Semantic HTML, labels, focus order,
    AA contrast."

Semantics & Keyboard

    Real Elements

    Use button, a, nav, and headings instead of styled divs.

    "Use <button>, not <div onClick>."
    Keyboard Operable

    Everything usable by mouse must work by keyboard too.

    "Tab to reach, Enter/Space to
    activate, Esc to close."
    Focus Management

    Visible focus and sensible focus order, especially for modals.

    "Trap focus in the dialog; return
    focus on close."

Names & Contrast

    Accessible Names

    Label icons, inputs, and controls for screen readers.

    "aria-label on the icon button;
    <label> tied to each input."
    ARIA Sparingly

    Use ARIA only when native semantics fall short.

    "Prefer native elements; ARIA only
    where needed."
    Color Contrast

    Require AA contrast and do not rely on color alone.

    "AA contrast; show state with icon +
    text, not color only."

Responsive & Verify

    Mobile-First

    Design for small screens first, then enhance upward.

    "Mobile-first; reflow, don't
    overflow. No h-scroll at 360px."
    Respect Preferences

    Honor reduced motion and sufficient tap target sizes.

    "Tap targets >=44px; respect
    prefers-reduced-motion."
    Actually Test

    Keyboard, automated checker, and screen reader for key flows.

    Tab through it. Run axe/Lighthouse.
    Check a screen reader.

Tips

  1. Name the standard ('meet WCAG 2.2 AA') and the specifics: roles, labels, focus order, contrast.
  2. Request keyboard and screen-reader behavior explicitly; these are the most commonly skipped.

Warnings

  1. Models produce div-soup with click handlers that keyboards and screen readers cannot use.
  2. Retrofitting accessibility later is costly; it is far cheaper to require it in the first prompt.

In Practice

FAQ