Use device-independent event handlers | |
WAI / WCAG 1.0 Priority 2 checkpoint 6.4 | |
Issue Description The page contains handlers for some mouse event for which there is no corresponding keyboard event handler. In particular:
|
|
How to fix
Inspect all of the event handlers defined in the page. Consider only those handlers that either change the page content (by adding or removing text, images, layers, or other objects) or the navigation options (menus, new windows, navbars, links). If any of these are specified using device dependent events (i.e. ONDBLCLICK, ONCLICK, ONKEYPRESS, ONKEYDOWN, ONMOUSEDOWN, ONKEYUP, ONMOUSEUP, ONMOUSEOVER, ONMOUSEOUT, ONFOCUS, ONBLUR) then they should be paired with event handlers for the other device as well. In particular:
|
|
Issue Explanation An event handler is a script that is invoked when a certain event occurs (e.g, the mouse moves, a key is pressed, the document is loaded, etc.). Event handlers are attached to HTML elements via event handler attributes (like "ONMOUSEDOWN", "ONCLICK", "ONKEYUP", etc.).
Often the effect of an event handler is purely decorative:
highlighting some text, or an image, or changing the color of some
portion of the page. In other cases, however, the event handler performs
more important activities: it validates the inputs to a form; shows
a rollover menu; opens up a new window; etc. If an event handler refers only to a specific device (like the mouse, as is the case with "ONMOUSEOVER" for example) then for a browser user with no mouse (for example a user with motor disabilities or a driver having to view the website on a PC installed in a car) would not be able to experience the effect of the handler. According to the W3C, device independence means (Web Content Accessibility Guidelines 1.0 [http://www.w3.org/TR/WCAG10/#device-independent] ): Users must be able to interact with a user agent (and the document it renders) using the supported input and output devices of their choice and according to their needs. Input devices may include pointing devices, keyboards, Braille devices, head wands, microphones, and others. Output devices may include monitors, speech synthesizers, and Braille devices. |