Pitfalls to Creating Accessible Content
Keyboard
Functionality operable from the keyboard. When content can be operated through a keyboard or alternate keyboard, it is operable by people with no vision (who cannot use devices such as mice that require eye-hand coordination) as well as by people who must use alternate keyboards or input devices that act as keyboard emulators. Keyboard emulators include speech input software, sip and puff software, on-screen keyboards, scanning software and a variety of assistive technologies and alternate keyboards. Individuals with low vision also may have trouble tracking a pointer and find use of software much easier (or only possible) if they can control it from the keyboard.
Some types of Web content functionality however cannot be controlled from the keyboard. A watercolor application for example where the stroke is defined by the movement and speed of movement and/or pressure is one example. The phrase "except where the task requires analog, time-dependent input" is included to separate those things that cannot reasonably be controlled from a keyboard.
Techniques
Use keyboard-controllable event handlers for all functionality.
- In addition to onMouseOver and onMouseOut, use onFocus and onBlur. These actions will be triggered when the keyboard is used. Both onFocus and onBlur are device independent, meaning that they can be performed with the mouse, keyboard, or other assistive technology.
- Use the onClick event handler on a link or form control instead of an element that cannot be accessed using a keyboard.
- Drop down menus should not use the onChange event handler as a keyboard only user will execute an onChange event for every move down the list. Instead allow the user to select the item from a list then select a button such as GO to activate the script.
