WCAG 1.0 Double A Checkpoint 6.4

Skip Quick Links

“For scripts and applets, ensure that event handlers are input device-independent. ”

  • Use device-independent event triggers like "onfocus", "onblur", "onchange".
  • Provide redundant input mechanisms.
    • "onmousedown" with "onkeydown"
    • "onclick" with "onkeypress", etc.

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.). In HTML 4.01, event handlers are attached to elements via event handler attributes (the attributes beginning with "on", as in "onkeyup").

Some event handlers, when invoked, produce purely decorative effects such as highlighting an image or changing the color of an element's text. Other event handlers produce much more substantial effects, such as carrying out a calculation, providing important information to the user, or submitting a form. For event handlers that do more than just change the presentation of an element, content developers should do the following.

If you must use device-dependent attributes, provide redundant input mechanisms (i.e., specify two handlers for the same element):

  • Use "onmousedown" with "onkeydown"
  • Use "onmouseup" with "onkeyup"
  • Use "onclick" with "onkeypress"

Complete List of Event Handlers

  • onblur
  • onchange
  • onclick
  • ondblclick
  • onfocus
  • onkeydown
  • onkeypress
  • onkeyup
  • onload
  • onload
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • onreset
  • onselect
  • onsubmit
  • onunload


Directly Accessible Scripts

Directly Accessible Applets