# Voice Control: Using Websites by Speaking

Source: https://allyway.ai/glossary/voice-control

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](https://www.w3.org/WAI/perspective-videos/voice/) 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](https://allyway.ai/glossary/keyboard-navigation) | 2.1.1 Keyboard | A |
| The [accessible name](https://allyway.ai/glossary/accessible-name) contains the visible label – see [label in name](https://allyway.ai/glossary/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](https://allyway.ai/glossary/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 |

> **Note:** > **Icon buttons are the hardest part**
> A magnifying-glass icon has no visible word. Users guess "Click Search", "Click Find" or ask their software to show numbers on every clickable element. A visible text label next to the icon removes the guesswork.

## Examples

```html title="Example"
<!-- 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.

**Do:** Do

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.

**Don't:** Don't

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

Q: Who uses voice control to browse the web?
A: 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.

Q: What does voice control need from a website?
A: Full keyboard support and controls whose names match their visible labels. Then users can activate every link and button by saying what they see.

Q: Why does my button not react to voice commands?
A: 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.

Q: Is voice control the same as a screen reader?
A: No. A screen reader outputs content as speech or braille; voice control takes spoken commands as input. Some people use both at once.
