# Switch Control: Using Websites with One Button

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

Switch control, or switch access, is assistive technology that lets people operate a computer or phone with one or more simple switches instead of a keyboard, mouse or touch screen. Scanning software highlights items one after another, and a press of the switch selects the highlighted one.

Switch control lets people use a website with a single button – pressed with a hand, a foot, the head, or by sipping and puffing into a tube. Scanning software moves a highlight from one item to the next, and when the right link or button is highlighted, the person presses the switch. Every extra stop on the way costs time and effort, so the structure of your page decides how fast someone can get things done.

## What it means

W3C lists "switches operated by foot, shoulder, sip-and-puff, or other movements" among the tools of people with physical disabilities – see W3C's page on [physical disabilities](https://www.w3.org/WAI/people-use-web/abilities-barriers/physical/). Many of them live with severe [motor impairments](https://allyway.ai/glossary/motor-impairments) and cannot use a keyboard, mouse or touch screen reliably. Apple calls the built-in feature Switch Control (iPhone, iPad and Mac), Android calls it Switch Access; on-screen keyboards add scanning on other systems.

There are two common ways to use switch access:

| Method | How it works | What it needs from a website |
|---|---|---|
| Scanning with one switch | The highlight moves on by itself; one press selects | Few stops before the main content, enough time |
| Two switches | One switch moves to the next item, the other selects | A logical order, every control reachable |
| Point scanning | Lines sweep across the screen to pick a point | Big enough targets, no fine dragging |

Switch software works through the same channel as the keyboard. The W3C Understanding page for [2.1.1 Keyboard](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) names sip-and-puff software, on-screen keyboards and scanning software as keyboard emulators. If your site works with [keyboard navigation](https://allyway.ai/glossary/keyboard-navigation), switch users can usually reach everything too.

The WCAG 2.2 criteria that matter most:

| Requirement | WCAG criterion | Level |
|---|---|---|
| Everything works with the keyboard | 2.1.1 Keyboard | A |
| Focus never gets stuck – no [keyboard trap](https://allyway.ai/glossary/keyboard-trap) | 2.1.2 No Keyboard Trap | A |
| Time limits can be turned off, adjusted or extended | 2.2.1 Timing Adjustable | A |
| Repeated blocks can be skipped, e.g. with a [skip link](https://allyway.ai/glossary/skip-link) | 2.4.1 Bypass Blocks | A |
| A logical [focus order](https://allyway.ai/glossary/focus-order) | 2.4.3 Focus Order | A |
| The highlighted element is always [visible](https://allyway.ai/glossary/focus-visible) | 2.4.7 Focus Visible | AA |
| No dragging needed – see [dragging movements](https://allyway.ai/glossary/dragging-movements) | 2.5.7 Dragging Movements | AA |

> **Tip:** > **Count the stops**
> A switch user who scans through 40 menu links before the main content may need minutes for what a mouse user does in a second. A skip link and a tidy navigation save real effort.

## Examples

```html title="Example"
<!-- Not reachable: a div with a click handler gets no focus -->
<div class="btn" onclick="addToCart()">Add to cart</div>

<!-- Reachable for keyboard, switch and voice users -->
<button type="button" onclick="addToCart()">Add to cart</button>

<!-- A skip link as the first focusable element -->
<a href="#main" class="skip-link">Skip to main content</a>
```

The `div` never gets a highlight, so a switch user cannot select it at all. The native `button` gets focus, works with Enter and Space and is picked up by scanning software without extra code.

**Do:** Do

Use native links and buttons, keep the tab order short and logical, offer a skip link, show a strong focus outline, let people pause or extend time limits and provide a button alternative for every drag or swipe.

**Don't:** Don't

Build controls from `div` elements, auto-advance carousels without a pause button, end sessions after a short fixed time, require drag and drop, or hide the focus outline with `outline: none`.

## How to test with switch control



## Questions

Q: What is switch access?
A: A way to operate a device with one or more simple switches instead of keyboard, mouse or touch. Software highlights items in turn, and the user presses a switch to select the highlighted one.

Q: Who uses switch control?
A: Mainly people with severe physical disabilities, for example after a spinal cord injury or with ALS or cerebral palsy, who cannot use a keyboard or mouse. The switch can be pressed with any movement they control well.

Q: What is a sip-and-puff switch?
A: A switch operated by breathing into or sucking on a tube. A puff and a sip act as two different switches, so people can operate a device without using their hands.

Q: Does a website need special code for switch control?
A: No. Switch software uses the same focus and keyboard events as the keyboard. A site that works fully with the keyboard, in a logical order and with visible focus, works with switches too.

Q: Why is my website slow to use with switch access?
A: Usually because of too many stops: long menus without a skip link, many small links, or content that moves and resets the scan. Fewer, clearer focus stops make the biggest difference.
