Switch Control: Using Websites with One Button
Also called: Switch access, Switch input, Scanning, Sip-and-puff switch
Definition
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. Many of them live with severe 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 names sip-and-puff software, on-screen keyboards and scanning software as keyboard emulators. If your site works with 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 | 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 | 2.4.1 Bypass Blocks | A |
| A logical focus order | 2.4.3 Focus Order | A |
| The highlighted element is always visible | 2.4.7 Focus Visible | AA |
| No dragging needed – see dragging movements | 2.5.7 Dragging Movements | AA |
Examples
<!-- 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.
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.
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
What is switch access?
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.
Who uses switch control?
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.
What is a sip-and-puff switch?
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.
Does a website need special code for switch control?
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.
Why is my website slow to use with switch access?
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.
Related terms
Motor 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 ExplainedFocus Visible: WCAG 2.4.7 and Visible Focus Styles
Focus visible means that a website shows a visible indicator – usually an outline – on the link, button or field that currently has keyboard focus. WCAG 2.4.7 requires it at Level AA.
Read definition: Focus Visible: WCAG 2.4.7 and Visible Focus StylesVoice Control: Using Websites by Speaking
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”.
Read definition: Voice Control: Using Websites by Speaking