Software checklist

Checkpoint 4.3: System settings for high contrast - examples for Java developers

Support systems settings for high contrast for all user interface controls and client area content.

This page provides specific examples to implement the Software techniques for high contrast using Java Swing. For an explanation of this requirement, see Rationale for system settings for high contrast in the Software checklist.


Required development techniques

The following techniques are the minimum required to meet Checkpoint 4.3 from the IBM Software Accessibility Checklist:

  1. Software must determine if the user has specified high contrast and ensure use the color scheme specified by the high contrast setting is supported throughout the software.
  2. If system settings are not automatically inherited, provide an option to use the system settings for high contrast instead of the program settings.

Examples for Java developers

  1. Software must determine if the user has specified high contrast and ensure use the color scheme specified by the high contrast setting is supported throughout the software.

    Example 1

    If the software uses the Windows Pluggable Look and Feel (PLAF), provided with JFC, and standard JFC components, the controls and text will automatically inherit the Windows system settings for high contrast.

    Example 2

    If the software does not use the Windows Pluggable Look and Feel (PLAF), is cross-platform or uses custom components then you will need to create a PLAF. You can create the new PLAF from the Windows PLAF. The PLAF uses the Java Native Interface (JNI) to access a Dynamic Link Library (DLL) that you will create. This DLL will need to access system high contrast settings for each component by calling the SystemParametersInfo function.

  2. If system settings are not automatically inherited, provide an option to use the system settings for high contrast instead of the program settings.

    Example 3

    Even if the software provides custom settings for displaying content, it must still provide a way for users to choose the system settings instead of custom settings provided by the program.


Recommended development techniques

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

  1. Automatically inherit changes in high contrast settings so users do not have to stop and restart the application to get the new setting. The Windows PLAF will automatically inherit changes in the high contrast settings.
  2. For operating systems and components that do not have corresponding standard system controls you can create high contrast capabilities that the user can set. ( Javax.Swing.Colorchooser - JColorChooser ).
  3. Default text size to a minimum of 10 even if other font sizes less than this are available.
  4. Default contrast ratio to a minimum of 200:1.
 

Required test techniques

There are no unique steps for testing high contrast for Java Swing. Follow the required test techniques for system settings for high contrast in Software checkpoint 4.3.


©2009, 2013 IBM Corporation

Last updated January 1, 2013.