AnnouncementFocus the demo to see what it exposes.
Labeling
- Use
htmlForwhen the control is rendered separately. - Wrapping the control inside
Labelis also valid for checkbox-like compositions.
Keyboard Behavior
Labelhas no custom keyboard behavior.- Keyboard interaction is owned by the associated control.
Focus Behavior
- Clicking the label should move focus to the associated control when native label association is intact.
Screen Reader Semantics
Labelrenders a native<label>.- Assistive technology uses it to name the associated input when correctly connected.
Form Semantics
- Prefer a visible
Labelover relying on placeholder text. - Keep one clear label-to-control relationship.
Accessibility Risks
- missing
htmlForwhen the control is rendered separately - using one label for multiple unrelated controls
- placing links or buttons inside the label without testing click behavior