Skip to main content

Keyboard equivalents for all actions

Java™ checkpoint 1.1

Provide keyboard equivalents for all actions.

 

Rationale

Someone who is unable to use the mouse needs all functions to be available via the keyboard. Users with limited hand use may not have the fine motor control required to position the mouse pointer accurately on objects displayed on the screen. Blind users cannot position the mouse pointer because they can't see the screen. The keyboard provides a precise discrete method of navigating and selecting. Mobility impaired users using the keyboard can precisely navigate and select using the keyboard. Blind users using the keyboard can precisely navigate to the elements of the application which their screen reading software will then read to them. In this way, blind users are able to establish a mental model of the application and learn repeatable steps for accomplishing tasks.

Keyboard equivalents benefit all users, providing an alternative to using the mouse which may cause repetitive stress injuries. Good keyboard implementation can also improve user productivity.

Development techniques

The accessibility requirement is for all functions of the software, that are not inherently mouse functions, to be operable using only the keyboard. Drawing is an example of a function that is inherently a mouse function. Direct manipulation, such as selecting text, is not inherently a mouse function. For a particular software platform, there are standard keys and key combinations for doing common things. Consult the Java Foundation Class keyboard assignments for information on keyboard bindings in JFC components. These platform-specific standard keys are normally specified in the platform user interface style guideline document. The following list provides links to style guidelines for Microsoft Windows, Apple Macintosh, and UNIX platforms:

The following techniques are the minimum required to meet Checkpoint 1.1 from the IBM Java Accessibility Checklist:

The techniques above are required; the following techniques are recommended to enhance accessibility:

public class BorderTest extends Frame
implements Accessible{
public BorderTest () {
  AccessiblePanel p = new AccessiblePanel();
  p.setLayout(new BorderLayout();
  p.add(new MyAccessibleButton("Left");
  p.add(new MyAccessibleButton("Bottom");
  p.add(new MyAccessibleButton("Right");
  p.add(new MyAccessibleButton("Top");
  add("North", p);
  }
AccessibleContext getAccesibleContext() {
			   ...
  }
}

Child enumeration in Java enumerates the children in the order they were added. Adding the components in the same order that they would logically be read on the screen enables the assistive technology to read the components in the appropriate order.

  • In dialogs, allow the user to press the Shift+Tab key combination to move backwards through dialogs. Without this feature, the user will have to cycle all the way through the end of a dialog and back to the beginning in order to back up to a previous control.

Testing techniques

Test the software to ensure that it complies with accessibility requirements.

Tools

There are no tools required to test this checkpoint.

Techniques

The following techniques are required to verify this checkpoint:
  Checkpoint Comments
1 Test with the keyboard to verify keyboard equivalents for all actions. See the user interface style guidelines listed under Techniques for standard keys to be tested on each platform.
At a minimum, the following keyboard operations must be tested:
Pass:
The keyboard can be used to access all actions available from the mouse.

Fail:

The mouse is required to access some or all actions.
2 Test with the keyboard to verify unique keyboard support provided by the software. For example, in Lotus Notes, Alt+B is used to access the Bookmark bar and Ctrl+Tab is used to move between open tasks.

Pass:

The keyboard can be used to access application specific actions available from the mouse.
Fail:

The mouse is required to access some or all application specific actions.


©2001, 2008 IBM Corporation

Last updated February 15, 2008.