Provide text through standard system function calls or through an API (application programming interface) which supports interaction with assistive technology.
Rationale
Screen readers determine what software is doing by watching calls to drawing functions and remembering what text and graphics have been drawn and where. Screen readers also save attributes of the text such as font, size, color, and style, to be reported to the user. They also watch information being copied from one location to another and being erased or overwritten by other text or graphics. The component in a screen reader that does all this work is called an off-screen model (OSM). OSM's rely on being able to monitor normal system drawing operations. Screen readers use the OSM to get information such as text content, text input caret location, and text attributes. If text is displayed in a non-standard way, the screen reader not be able to detect it and read it to a blind user.
Development techniques
UThe following techniques are the minimum required to meet Checkpoint 4.1 from the IBM Software Accessibility Checklist:
- The minimum information that must be provided about the text is text content, input caret location and attributes.
- Draw text using the standard function calls. For Windows systems, use ExtTextOut and DrawText. In Eclipse use the setText() method of the org.eclipse.swt.widgets.Control subclasses or, when creating your own custom widget, use org.eclipse.swt.graphics.GC.drawText() and drawString(). In addition, custom widgets should implement the org.eclipse.swt.accessibility.AccessibleTextListener to provide information about caret offset and selection range and should actively notify Active Accessibility of changes using org.eclipse.swt.accessibility.Accessible.textCaretMoved, textChanged() and textSelectionChanged() methods. Note: all widgets provided by the SWT toolkit already support the AccessibleTextListener.
If your application uses any custom techniques for displaying text to improve performance, you must draw text using ExtTextOut and DrawText when a screen reader is running. On Windows systems, call the SystemParametersInfo function with the SPI_GetScreenReader value. For more information on this technique, see the SystemParamtersInfo function (link resides outside of ibm.com) in the Microsoft Platform SDK. - Use standard functions to copy or erase text and graphics. For Windows systems, these APIs include BitBlt, PatBlt, and StretchBlt. You need to do this whether drawing to a screen or to an off-screen bitmap, because screen readers track the text and graphics from the time they are drawn until they are copied to the screen.
- Do not directly manipulate bitmaps. Some applications directly manipulate the memory associated with a device context, bypassing the system functions altogether. In these cases screen readers are not aware of the changes taking place and the application is not accessible.
- Do not directly modify the screen. The following Windows APIs should be avoided since they manipulate bitmaps or display pixels directly: DirectDraw, Display Control Interface (DCI), WinG, and CreateDIBSection.
- An "About" box is a dialog box displayed when the user selects the "About..." menu item on the "Help" menu. It usually contains information such as the product version number and copyright information. If an "About" box is provided, it must be an accessible dialog box, not a bit map containing text. Providing accessible text allows a screen reader to read it to a user and will make it more readable when magnified with a screen magnifier. For an example of an accessible "About" box, see Internet Explorer version 6.
Splash screens that are displayed briefly when an application is loading are not required to be accessible if the version and copyright information in the splash screen is also available in an accessible "About" dialog box.
Testing techniques
Tools
The following tools may be used to test this checkpoint.
- A screen reader (e.g. JAWS (link resides outside of ibm.com) or Window-Eyes (link resides outside of ibm.com) for Microsoft Windows applications).
Techniques
Perform the following steps to verify the accessibility of text elements in the current window.
| Action | Result |
|---|---|
|
1. With a screen reader active, navigate to all text content and verify the screen reader can announce all text. |
Pass:
|
©2001, 2008 IBM Corporation
Last updated June 1, 2008.
