Support systems settings for high contrast for all user interface controls and client area content.
Rationale
For most people, color is a matter of preference, but it is critical for many users with visual impairments. Many users with low vision need high contrast between text and the background to be able to read information on the screen. They may even need a particular color scheme, such as white text on a black background, to prevent the background from "bleeding" over and obscuring the foreground text. Some people consider the default color scheme legible but find that it causes eyestrain over longer periods of time.Windows is currently the only operating system that provides a "high contrast" setting. The purpose of this checkpoint is to enable users who need a high contrast color scheme to define their display preferences in one place rather than having to modify the display settings for each application.
Development techniques
This checkpoint is not applicable to software that will not run on a Windows platform. Software intended to run on Windows platforms must implement one of the following techniques to meet Checkpoint 4.3 from the IBM Software Accessibility Checklist:
- Windows applications should use the SPI_GETHIGHCONTRAST and SPI_SETHIGHCONTRAST flags with the SystemParametersInfo function to get and set the high contrast parameter. The status of the high contrast parameter should be checked during initialization and when processing WM_SYSCOLORCHANGE messages. The status of the high contrast parameter can be obtained by calling SystemParametersInfo with the SPI_GETHIGHCONTRAST flag. If the dwFlags member of the HIGHCONTRAST structure has the HCF_HIGHCONTRASTON bit set, then the high contrast support is enabled. The high contrast parameters (link resides outside of ibm.com) are discussed in more detail on the Microsoft MSDN site. Microsoft also provides examples for enabling high contrast (link resides outside of ibm.com) on their Web site.
The following code sample from the MSAA SDK shows how to check for high contrast:
BOOL fHighContrast = FALSE;
HIGHCONTRAST hc;
hc.cbSize = sizeof( hc );
if( SystemParametersInfo( SPI_GETHIGHCONTRAST, sizeof( hc ), & hc, FALSE ) && ( hc.dwFlags & HCF_HIGHCONTRASTON ) )
fHighContrast = TRUE;
For more information, see Enabling High Contrast (link resides outside of ibm.com) on the Microsoft MSDN site. - If system settings are not automatically inherited, provide an option to use the system settings for high contrast instead of the program settings. Even if the software provides custom settings for displaying content, it must still provide an way for users to choose the system settings instead of custom settings provided by the program.
- Eclipse applications should use the getHighContrast() method to determine whether the user has enabled a high contrast scheme. Use the standard background color in a high contrast theme. The following example sets white as background color if not in a high contrast theme.
Boolean highContrat = Display.getDefault().getHighContrast();
if (highContrast) {
return Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND);
}
else {
return Display.getCurrent().getSystemColor(SWT.COLOR.WHITE);
The techniques above are required; the following techniques are recommended to enhance accessibility:
- Provide an option that enables users to turn off patterned backgrounds in the software. Text drawn over a patterned background will be illegible for many users because it does not provide sufficient contrast between the background and the text, and because the pattern "bleeds" into the text. In order to read the information on the screen, some users need to be able to turn off the background and revert to a solid color background.
- Turn off the background in response to the High Contrast setting.
- Provide sufficient contrast in the default background and text. For example, do not use black text on a gray background. "Effective Color Contrast" (link resides outside of ibm.com) from Lighthouse International provides contrast guidelines.
Testing techniques
Test the software to ensure that it complies with accessibility requirements. Windows is the only platform that currently provides a system setting for high contrast. This checkpoint cannot be verified on other platforms.
Tools
There are no tools required to test this checkpoint.
Techniques
The following techniques are required to verify this checkpoint:
| Action | Result |
|---|---|
1. If the software automatically inherits the system settings for high contrast:
|
Pass:
The software inherits the new setting and most window text including the main (client) window is displayed as white text on black background. You can check the colors that should be displayed for specific items on the screen by opening the Control Panel and selecting Display. On the Appearances tab, you can see how specific Windows controls should be displayed using the high contrast scheme. Fail:
|
2. If the software provides an option to inherit system settings instead of automatically inheriting them:
|
Pass:
The software inherits the new setting and most window text including the main (client) window is displayed as white text on black background. You can check the colors that should be displayed for specific items on the screen by opening the Control Panel and selecting Display. On the Appearances tab, you can see how specific Windows controls should be displayed using the high contrast scheme. Fail: The software did not automatically inherit system settings and did not provide an option for users to choose the system settings. The software provided an option to inherit system settings for high contrast, but did not inherit the new scheme for one or more items on the screen. |
©2001, 2008 IBM Corporation
Last updated January 28, 2008.
