Should form labels be wrapped or separate?

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Using nested labels without a for attribute breaks voice control in Dragon Naturally Speaking and Voice Control, so developers must switch to explicit label syntax.

Read this as

A web accessibility expert, James Edwards, found that two voice-control tools, Dragon Naturally Speaking on Windows and Voice Control on Mac and iPhone, cannot link a form label to its field when the field is simply placed inside the label element. This means a person saying 'Name' to fill in a box may fail. Writing the label with an explicit 'for' attribute pointing to the field's ID fixes it. No versions, dates or other specifics are given.

Sites relying on nested HTML labels risk failing voice-control users: Dragon Naturally Speaking and Apple's Voice Control both miss the implicit label-input relationship, an accessibility and potential legal compliance risk. The fix is cheap, add a for attribute matching the input's ID, so an audit of existing forms is the practical action. The article cites no statistics on affected sites.

James Edwards reports that implicit labels (<label>Name <input></label>) are not recognised by Dragon Naturally Speaking for Windows or Voice Control for macOS/iOS, breaking voice activation of form fields. The recommended pattern is <label for="element_id">, optionally still nesting the input inside. No browser compatibility data, screen reader versions, or test methodology are provided.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Dragon Naturally Speaking Voice Control James Edwards Chris Ferdinandi Simon Willison

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading