U.S. Web Design System: Form component
Documents form accessibility guidance including DOM order, validation aligned with inputs, fieldset and legend grouping, required indicators, and disabled-state cautions such as explaining why an element is disabled and supporting screen reader and keyboard users.
What this source can teach
Use this source to compare a documented solution with the task and states in your own product.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Dependent fields | Choose dependent fields when one answer controls another field's valid choices, requirement, editability, helper text, or validation. | Users encounter the controlling field before the dependent field in reading and tab order. | USWDS supports explaining disabled states, aligning validation with inputs, and preserving accessible form order for dependent controls. |
| Required field hidden by conditional logic | Flag this anti-pattern when a required field can block submit while it is hidden, collapsed, disabled, off-screen, absent from the current route, or disconnected from its trigger. | Selecting a trigger that creates a required follow-up reveals that follow-up immediately in logical DOM and visual order. | USWDS form guidance supports required indicators, validation alignment, DOM order, grouping, and explaining disabled states. |
Comparisons supported by this source
- Dependent fields vs select vs inline validation vs complete complex form
USWDS form guidance anchors disabled-state and validation-accessibility requirements for dependent controls that are unavailable until prerequisites are met.
- Required field hidden by conditional logic vs conditional reveal fields vs dependent fields vs error summary vs single-page form vs review before submit
USWDS form guidance supports validation alignment, required indicators, DOM order, grouping, and disabled-state explanations.
Evidence Role
This source is treated as pattern-library evidence. Its value comes from the specific claims and setting described above.
Publisher: U.S. Web Design System. Last checked: .