Some individuals are restricted to the input devices they can use. Some can only use the keyboard or the mouse while others must use other devices such as head pointers and virtual keyboards. Scripts which use device dependent attributes such as “onmousedown”, “onmouseup”, “onclick”, “ondblclick”, “onkeydown”, “onkeyup” and “onkeypress” may not be accessible to some of these individuals. Instead device independent attributes should be used such as “onfocus”, “onblur” and “onselect”. Moreover, it may be possible to use both the mouse and keyboard handlers to achieve the same accessibility.
Guidelines:
- Use application level event triggers rather than user interaction level triggers
- If device dependent attributes are used, provide redundant input mechanism i.e. provide two handlers for the same event. For example, use "onmousedown" with "onkeydown" and use "onmouseup" with "onkeyup"
- Do not write event handlers that rely on mouse coordinates
- If you use java applets and flash, apply the accessibility guidelines accordingly
Validation Techniques:
- Pages using scripts could be checked using Notepad for the strings 'onMouse', 'onKey', 'onClick' and 'onDblClick'. Where device dependent attributes exist, they must be complemented by an alternative device script. Otherwise, the page will fail the test.
- Try to navigate through the form using only mouse or keyboard. All functionalities should be reached in both cases