← Back to Catalog

Labels contain only text

labels-contain-only-text

Labels contain only text — no links, buttons, tooltips, or headings inside `<label>`. Voice control and screen readers break. Dual-cite clickable-label (Vercel) without stuffing interactive children into the label.

Description

A `<label>` must contain text only—no nested link, button, tooltip, or heading—because voice control and screen readers break on interactive children inside the label. Keep help and links outside the label element so the name stays operable. Fail when interactive or heading content is nested inside `<label>`. Apply when authoring label markup for form controls that need a clean accessible name.

When to use

Authoring label markup for form controls.

Not when

Not for help that sits beside the field outside the label element.

Agent hint

Keep label children text-only; move links and controls outside the label.

Pass

`<label>` contains text only — no nested link, button, tooltip, or heading.

Fail

Interactive or heading content is nested inside `<label>`.

Citations

Open UX · cited UX rules agents audit against

Privacy · Sources ·