onMouseOver/Out Must Have onFocus/onBlur events

Overview

The use of Javascript with HTML to create interactive and dynamic web pages creates the responsibility for keyboard access to these features. When developers use the onmouseover and onmouseout event handlers they must make sure the functions associated with the event handlers are also supported by the keyboard, typically using the onfocus and onblur event handlers.

Benefit to People with Disabilities

  1. People with disabilities can use keyboard commands in addition to mouse commands to activate event handlers for styling effects and changing content.

Benefits to All Users

  1. All users will benefit from being able to use keyboard commands in addition to the mouse to activate event handlers, especially touch typists who do not like to take their fingers off the home keys.

Benefits to Developers

  1. Developers benefit by providing users with multiple ways to interact with their web resources, including mobile technologies.

HTML Markup Details

onmouseover and onmouseout attributes
The onmouseover and onmouseout events are often used to create styling effects, dispaly content from dynamic menus and provide contextual help information.
onfocus and onblur attributes
The onfocus and onblur events can be used to provide keyboard support to mouse pointer related events that are needed for accessibility.

Related Accessibility Requirements

Illinois Information Technology Accessibility Standards
13.1 Ensure that scripted functions are usable with assistive technologies.
13.2 Ensure that significant interactions can be performed with both keyboard and mouse.
Section 508
1194.21 (a) When software is designed to run on a system that has a keyboard, product functions shall be executable from a keyboard where the function itself or the result of performing a function can be discerned textually.
1194.21 (l) When electronic forms are used, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues.
1194.22 (l) When pages utilize scripting languages to display content, or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology.
1194.22 (n) When electronic forms are designed to be completed on-line, the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues.
W3C Web Content Accessibility Guidelines 2.0
2.1.1 Keyboard
2.1.2 No Keyboard Trap
2.1.3 Keyboard (No Exception)
Web Content Accessibility Guidelines (WCAG 1.0)
6.4 For scripts and applets, ensure that event handlers are input device-independent. [Priority 2]
8.1 Make programmatic elements such as scripts and applets directly accessible or compatible with assistive technologies. [Priority 1 if functionality is important and not presented elsewhere, otherwise Priority 2]
9.3 For scripts, specify logical event handlers rather than device-dependent event handlers. [Priority 2]