Field
The wrapper that composes label, hint, control and validation.
Include the unit number, if any.
Show the markup
<div class="cc-field">
<label class="cc-label" for="ex-field">Street address</label>
<p class="cc-hint" id="ex-field-hint">Include the unit number, if any.</p>
<input class="cc-input" id="ex-field" autocomplete="street-address" aria-describedby="ex-field-hint">
</div>
Accessibility
- Order is fixed: label → hint → control → validation. Screen readers hear the context before the input.
- Use
autocompletetokens for personal data (1.3.5) — it also enables browser autofill, which helps everyone.