# Testing

There are several points of review to conduct before declaring an application accessible. Over the course of development you may want to consider automated testing techniques. LDTP, for example, may complement your automated testing plan.

This section describes a number of tests you can perform manually on an application to test its accessibility. Passing all the tests does not necessarily imply that the application is fully accessible, but if the application fails any of these tests, then further work may need to be done to improve that aspect of its accessibility.

## Keyboard Navigation

The following keyboard operations should be tested. Do not use the mouse in any part of this test.

- Using only keyboard commands, move the focus through all menu bars in the application.

- Confirm that:

  - Context sensitive menus display correctly.

  - Any functions listed on the toolbar can be performed using the keyboard.

  - You can operate every control in the client area of the application and dialog boxes.

  - Text and objects within the client area can be selected.

  - Any keyboard enhancements or shortcuts are working as designed.

## Graphical Elements

Test the application using a screen reader and confirm that:

- Labels and text are being read correctly, including menus and toolbars.

- Object information is read correctly.

## Visual Focus Indicator

- Verify that when moving among objects that the visual focus indicator is easy to identify.

- Keyboard navigation through the software and menus should be clearly visible when the focus moves.

- Confirm that the screen reader is tracking the visual focus indicator as you navigate using a keyboard.

- Run a screen magnification program (if available) and verify that the magnifier can track the visual focus indicator as you navigate using the keyboard and mouse.

## Fonts and Text

- Change the font in the application and confirm that the settings are maintained.

- Test the application by changing colors and confirm that all settings are maintained.

- If magnification is available, test the font, color, and size using the magnification option.

## Color and Contrast

- Print screenshots to a black and white printer and confirm that all information is visible.

- Test applications using only black and white, high-contrast settings and confirm that all information is conveyed correctly.

- Test that the application provides at least three combinations of color schemes and that high-contrast schemes are available (e.g. white on black or yellow on blue).

- Turn on high-contrast settings in the GNOME Control Center and confirm that the application respects these settings.

- Test various themes to ensure that the software is working for all the available settings.

## Audio

There should be an option in the application to show audio alerts visually.

Test that the audio is working correctly by enabling sound in the GNOME Control Center and then perform the following actions:

- Perform an action that should generate an audio alert and confirm that the application is working as designed.

- Verify that the application works correctly when increasing or decreasing the volume.

- Confirm that warning messages and alerts can be heard correctly in a noisy work environment.

## Animation

Verify that an option is available to stop animation and that it is working as designed.

Turn the animation off. Confirm that all information is still conveyed correctly.

## Keyboard Focus

- Test all messages to confirm that the user is notified before a message times out and is given the option to indicate that more time is needed.

- Make sure an option has been included to adjust the response time and confirm that it is working as designed.

## Documentation

Test ASCII text documentation with a screen reader to confirm that it is clear and precise and can be read by assistive technologies.

Test HTML applications using a web browser and screen reader to confirm that the documentation is accessible to assistive technologies.

Note: There are web accessibility guidelines available at http://www.w3.org/TR/WAI-WEBCONTENT/.

Confirm the following information is included in the documentation:

- State if the application does not support the standard keyboard access used by the OS.

- Identify if there are unique keyboard commands.

- Identify any unique accessibility features.

- If an action is documented for the mouse, make sure there is an alternative for using the keyboard.

## User Interface Checklist

This section summarizes the guidelines given in User Interface Guidelines for Supporting Accessibility. You should refer to that section of the guide for more detailed information on any of the checklist items given here.

When testing an application for accessibility, you should go through each of the items in the list. Note whether the application passes or fails each test, or does not apply to that application.

### General Principles checklist

GP | General Principles | Pass/Fail/NA
--- | --- | ---
GP.1 | Every action that alters the user's data or application's settings can be undone.
GP.2 | All application settings can be restored to their defaults without the user having to remember what those defaults were.
GP.3 | After installation, the application can be used without the user having to insert a disk or CD at any time.
GP.4 | The most frequently used functions are found at the top level of the menu structure.

### Keyboard navigation checklist

KN | Keyboard Navigation | Pass/Fail/NA
--- | --- | ---
KN.1 | Efficient keyboard access is provided to all application features.
KN.2 | All windows have a logical keyboard navigation order.
KN.3 | The correct tab order is used for controls whose enabled state is dependent on checkboxes, radio buttons or toggle buttons.
KN.4 | Keyboard access to application-specific functions does not override existing system accessibility features.
KN.5 | The application provides more than one method to perform keyboard tasks whenever possible.
KN.6 | There are alternative key combinations wherever possible.
KN.7 | There are no awkward reaches for frequently performed keyboard operations.
KN.8 | The application does not use repetitive, simultaneous keypresses.
KN.9 | The application provides keyboard equivalents for all mouse functions.
KN.10 | Any text or object that can be selected with the mouse can also be selected with the keyboard alone.
KN.11 | Any object that can be resized or moved with the mouse can also be resized or moved with the keyboard alone.
KN.12 | The application does not use any general navigation functions to trigger operations.
KN.13 | All keyboard-invoked menus, windows and tooltips appear near the object they relate to.

### Mouse Interaction checklist

MI | Mouse Interaction | Pass/Fail/NA
--- | --- | ---
MI.1 | No operations depend on input from the right or middle mouse buttons.
MI.2 | All mouse operations can be cancelled before they are complete.
MI.3 | Visual feedback is provided throughout drag and drop operations
MI.4 | The mouse pointer is never warped under application control, or its movement restricted to part of the screen by the application.

### Graphical Elements checklist

GE | Graphical Elements | Pass/Fail/NA
--- | --- | ---
GE.1 | There are no hard-coded graphical attributes such as line, border or shadow thickness.
GE.2 | All multi-color graphical elements can be shown in monochrome only, where possible.
GE.3 | All interactive GUI elements are easily distinguishable from static GUI elements.
GE.4 | An option to hide non-essential graphics is provided.

### Fonts and Text checklist

FT | Fonts and Text | Pass/Fail/NA
--- | --- | ---
FT.1 | No font styles or sizes are hard-coded.
FT.2 | An option to turn off graphical backdrops behind text is provided.
FT.3 | All labels have names that make sense when taken out of context.
FT.4 | No label names are used more than once in the same window.
FT.5 | Label positioning is consistent throughout the application.
FT.6 | All static text labels that identify other controls end in a colon (:).
FT.7 | Static text labels that identify other controls immediately precede those controls in the tab order.
FT.8 | An alternative to WYSIWYG is provided. For example, the ability to specify different screen and printer fonts in a text editor.

### Color and Contrast checklist

CC | Color and Contrast | Pass/Fail/NA
--- | --- | ---
CC.1 | Application colors are not hard-coded, but are drawn either from the current desktop theme or an application setting.
CC.2 | Color is only used as an enhancement, and not as the only means to convey information or actions.
CC.3 | The application supports all available high- contrast themes and settings.
CC.4 | The software is not dependent on any particular high-contrast themes or settings.

### Magnification checklist

MG | Magnification | Pass/Fail/NA
--- | --- | ---
MG.1 | The application provides the ability to magnify the work area.
MG.2 | The application provides the option to scale the work area.
MG.3 | The application's functionality is not affected by changing the magnification or scale settings.

### Audio checklist

AU | Audio | Pass/Fail/NA
--- | --- | ---
AU.1 | Sound is not used as the only means of conveying any items of information.
AU.2 | The user can configure the frequency and volume of all sounds and warning beeps.

### Animation checklist

AN | Animation | Pass/Fail/NA
--- | --- | ---
AN.1 | There are no flashing or blinking elements with a frequency greater than 2Hz or lower than 55Hz.
AN.2 | Any flashing or blinking is confined to small areas of the screen.
AN.3 | If animation is used, an option is available to turn it off before it is first shown.

### Keyboard Focus checklist

KF | Keyboard Focus | Pass/Fail/NA
--- | --- | ---
KF.1 | When a window is opened, focus starts at the most commonly-used control.
KF.2 | Current input focus position is clearly displayed at all times.
KF.3 | Input focus is shown in exactly one window at all times.
KF.4 | Appropriate audio or visual feedback is provided when the user attempts to navigate past either end of a group of related objects.
KF.5 | The default audio or visual warning signal is played when the user presses an inappropriate key.
KF.6 | There is sufficient audio information for the visual focus that the user can figure out what to do next.
KF.7 | When using assistive technologies, such as a screen reader or braille device, the current program indicates the position and content of the visual focus indicator.

### Timing checklist

TM | Timing | Pass/Fail/NA
--- | --- | ---
TM.1 | There are no hard-coded time-outs or time-based features in the application.
TM.2 | The display or hiding of important information is not triggered solely by movement of the mouse pointer.

### Documentation checklist

DC | Documentation | Pass/Fail/NA
--- | --- | ---
DC.1 | All documentation is in an accessible format, with textual alternate descriptions provided for all figures and diagrams.
DC.2 | The documentation includes a section that covers all the application's accessibility features.

## GOK (GNOME Onscreen Keyboard)

The information on this page is partially outdated: GNOME 3's Caribou has effectively replaced GNOME 2's gok.

Your application should be usable via gok; key input should be generated entirely by gok, not the keyboard. The aim here would be to work with your application and the desktop in general, ensuring any type of character input can be performed with the on-screen keyboard.

The gok application ships with the GNOME Desktop so should already be present. For full documentation, refer to the official gok site.

Follow these steps to verify the correct operation of gok with your application:

1. Login into the GNOME desktop

2. Run gok

3. Start your application

4. Provide input to your application with a pointing device (e.g., mouse or head-tracker) and gok.

5. Work using the auto-completion and word prediction features of gok.

6. Verify that gok enables and disables the Menus and Toolbars buttons based on the kind of application invoked; for example, the Menus and Toolbars buttons are disabled for the 'Font properties' capplet, but the same buttons are enabled for the Gedit application.

7. Verify that the gok on-screen keyboard provided by the Compose button can be used to type in any text for the selected application; run Gedit, click on the text area, and then click on the Compose button in gok. Select the required keys from the on-screen keyboard. The characters should appear in the Gedit text area.

8. Verify that the Launcher button allows the user to launch any of the Terminal, Web Browser or Text Editor applications.

9. Verify that the Activate button allows the user to activate any of the currently running application windows on the user's desktop, including GNOME panels and the GNOME desktop.

10. Verify that the Menus button lists all the available menus in the current application. Verify that clicking on a menu button displays the sub-menu and menu items contained within the sub-menu. Finally, verify that clicking on a menu item activates the menu item. For example, click on the Help Browser application and click on the Menus button. The GOK window now displays the File, Go and Help buttons (the Help Browser menus). Click on the File button and it displays the New Window and Close Window buttons (menu items).

11. Verify that the Toolbars button lists all the available buttons in the application toolbar. For example, click on the Help Browser application and then click on the Toolbars button. The GOK window now displays the Back, Forward and Home buttons.

12. Verify that the UI Grab button displays all the button objects for the selected application window. For example, open the 'Font Properties' capplet and click on the UI Grab button in the GOK window. The GOK window should now display the names of the buttons in the capplet - Sans, Sans-serif, Close and Help.

## Accerciser

Accerciser and the GNOME Accessibility Architecture

Accerciser is an interactive Python accessibility explorer for the GNOME Desktop. It uses AT-SPI to inspect and control widgets, allowing you to check if an application is providing correct information to assistive technologies and automated test frameworks. Accerciser has a simple plugin framework which you can use to create custom views of accessibility information. Full documentation can be found in the Official Accerciser Manual. For a demonstration of Accerciser and PyATSPI (Python-wrapped access and usage of AT-SPI), see this article. For an excellent walkthrough from the author, see the article titled Make Your Application Accessible with Accerciser.

Accerciser has effectively replaced the older at-poke tool.