Voice Control: Using Websites by Speaking
Also called: Speech recognition, Speech input, Voice input, Voice Access
Definition
Voice control, or speech recognition, is assistive technology that lets people operate a computer or phone by speaking. On websites, users dictate text into fields and activate links, buttons and other controls by saying their visible label, such as “Click Send”.
Voice control lets people use a website without touching a keyboard or mouse: they say "Click Contact", "Scroll down" or dictate their message into a form. It works beautifully – as long as the words people see on screen are the words the software knows. When a button says "Send" but its code calls it something else, the spoken command finds nothing.
What it means
W3C's video page on speech recognition explains who relies on it: people with physical disabilities who cannot use a keyboard or mouse, people with chronic conditions such as repetitive stress injury (RSI) who need to limit typing, and some people with cognitive and learning disabilities who would rather speak than type. People with a temporary limitation, like a broken arm, or anyone multitasking benefit too. W3C also notes a terminology point: "speech recognition" recognizes words, while "voice recognition" identifies who is speaking – in everyday language, both are used for voice control.
Built-in tools are Voice Control on macOS and iOS, Voice Access on Windows and Android, and dedicated dictation software. They all work the same way on the web: the software reads the names of controls from the browser and matches them against what the user says.
W3C names two requirements – keyboard compatibility is the basis, and the labels in the code must match what is shown on screen. In WCAG terms:
| Requirement | WCAG criterion | Level |
|---|---|---|
| Everything works with the keyboard – see keyboard navigation | 2.1.1 Keyboard | A |
| The accessible name contains the visible label – see label in name | 2.5.3 Label in Name | A |
| Every control has a name and role | 4.1.2 Name, Role, Value | A |
| Single-letter shortcuts can be turned off or changed, so spoken words don't trigger them – see character key shortcuts | 2.1.4 Character Key Shortcuts | A |
| Form fields have visible labels to dictate into | 3.3.2 Labels or Instructions | A |
Examples
<!-- Fails: the visible label "Send" is not part of the name -->
<button aria-label="Submit contact form">Send</button>
<!-- Works: the name starts with the visible label -->
<button>Send</button>
<!-- or, if you need more context for screen readers: -->
<button aria-label="Send message">Send</button>A voice control user who says "Click Send" activates the second and third button. With the first one, the software finds no control called "Send", and the user has to fall back to a grid of numbers or spoken mouse movements.
Use native buttons and links, keep the visible label at the start of the accessible name, give every field a visible label, make everything keyboard-operable and avoid single-key shortcuts or let users turn them off.
Override visible text with a different aria-label, build controls from div elements, rely on hover menus, use placeholder text as the only label, or name icon-only buttons with words nobody would guess.
How to test with voice control
Questions
Who uses voice control to browse the web?
Mainly people with motor impairments who can't use a keyboard or mouse, people with RSI who need to limit typing, and some people with cognitive disabilities. Many others use it now and then, for example with an injured hand.
What does voice control need from a website?
Full keyboard support and controls whose names match their visible labels. Then users can activate every link and button by saying what they see.
Why does my button not react to voice commands?
Usually because its accessible name differs from the visible text, for example an aria-label that replaces the label. WCAG 2.5.3 Label in Name requires that the name contains the visible label.
Is voice control the same as a screen reader?
No. A screen reader outputs content as speech or braille; voice control takes spoken commands as input. Some people use both at once.
Related terms
Label in Name: Visible Text in the Accessible Name
Label in Name is WCAG success criterion 2.5.3 (Level A). For user interface components with labels that include text or images of text, the accessible name contains the text that is presented visually.
Read definition: Label in Name: Visible Text in the Accessible NameMotor Impairments: Using the Web Without a Mouse
Motor impairments, also called physical or motor disabilities, are conditions that limit movement, muscle control, sensation or dexterity. People with motor impairments often use the web without a standard mouse – with a keyboard, switches, speech recognition, eye tracking or a head pointer.
Read definition: Motor Impairments: Using the Web Without a MouseKeyboard Navigation: WCAG 2.1.1 Explained
Keyboard navigation means that every function of a website can be reached and operated with a keyboard alone – usually with Tab, Shift+Tab, Enter, Space and the arrow keys. WCAG 2.1.1 requires it at Level A.
Read definition: Keyboard Navigation: WCAG 2.1.1 ExplainedAccessible Name: What It Is and How It Is Computed
The accessible name is the text that browsers pass to assistive technology to identify an element – for example the words a screen reader announces for a button, link or form field. WCAG 4.1.2 requires a programmatically determinable name for every user interface component.
Read definition: Accessible Name: What It Is and How It Is Computed