awesome-everything RU
↑ Back to the climb

Frontend Architecture

Accessible forms: multiple-choice review

Crux Multiple-choice synthesis across the forms-a11y unit: label association, announced errors, focus on first invalid, native vs ARIA, and constraint validation.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. Each mirrors a decision you make on a real form review — not a definition to recite, but the call between a form that works for everyone and one that only works with a mouse.

Goal

Confirm you can connect label association, announced errors, focus management, native semantics, and constraint validation into one decision tree — the synthesis the lesson built toward.

Quiz

A field shows its label as placeholder text only. A teammate argues it is fine because the text is visible. Why is this still a WCAG failure?

Quiz

Custom JS validation runs on submit and finds three invalid fields. The team paints them red and scrolls to the first. A keyboard/screen-reader user still hears nothing. What is the highest-leverage missing step?

Quiz

You add a div with role=button and a click handler that styles exactly like the design. A keyboard user reports the button does nothing. Beyond role, what was forgotten?

Quiz

You inject an error message into a div with role=alert in the same render that first mounts that div. Sighted users see it; many screen-reader users hear nothing. Why?

Quiz

A form relies entirely on native constraint validation (required, type=email, pattern). The team then adds e.preventDefault() to show custom messages and async checks. What responsibility did they just inherit?

Quiz

Design needs a styled dropdown the native select cannot match visually. Which implementation is the senior default, and why?

Recap

The through-line is one decision tree: every control needs a programmatically associated name (real label, not placeholder); errors must live in a pre-existing live region and be tied to their field with aria-invalid + aria-describedby; on a failed submit you must move focus to the first invalid field, not just scroll; native elements ship role, focusability, and keyboard handling you cannot fully replicate; and the moment you preventDefault you inherit the focus and announcement responsibilities the browser handled for free. Reach for ARIA-rebuilt widgets last, and only when the native element genuinely cannot do the job.

Continue the climb ↑Accessible forms: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.