When planning your application, you should take the time to consider the various accessibility requirements of your users. Accessibility design planning includes five basic principles: -
Flexibility The user interface should be flexible and customizable, allowing users to adjust it to their own individual needs and preferences. -
Input methods All operations in your application should be accessible by the keyboard alone, and basic operations should be available via the mouse as well. In the future, voice, directed visual cues, and other types of input may also be considered here. -
Output methods Output should not depend on a single method (such as sound, color , or text) for important information. -
Consistency The application should be consistent with the Windows operating system and other applications to reduce the learning curve required of new users. -
Compatibility with accessibility aids Microsoft Windows includes a number of accessibility aids, such as the Magnifier and the Onscreen Keyboard. Your application should support these accessibility aids. Table 10.2 details some of the accessibility guidelines you should use to support these principles. Table 10.2. Accessibility Guidelines for Application Design Area | Guidelines | Color | Use color to highlight information, but not as the sole means to convey important information. Remember that not all users can distinguish all colors. | Disks | Do not make the user insert or swap removable media during the normal operation of the application. | General UI | Provide a user interface that is flexible enough to accommodate the varying needs and preferences (such as font and color choices) of different users. | Keyboard focus | Many accessibility aids need to identify the location of the keyboard focus to function properly. The .NET Framework will take care of this for you. | Keyboard input | Applications should be accessible via keyboard input. Alternative input devices often emulate the keyboard, so if your application is fully available via the keyboard, it will generally be available to these devices as well. | Layout | Every item onscreen should be identified by a label to assist users who cannot see the entire screen at one time. | Mouse input | Some users may use a mouse (or a device whose interface emulates a mouse) more easily than a keyboard. Therefore, your application should also be available via the mouse. | Multitasking | Excessive consumption of processor power can interfere with accessibility aids. Therefore, your application should be as efficient as possible. | Size | Allow users to resize items onscreen to accommodate their own preferences. | Sound | Use sound to enhance information but do not rely on it as the sole means to convey important information. Users with hearing impairments or those working in noisy environments may be unable to make use of sound cues. | Timing | Timed events should be adjustable by the user to accommodate varying reaction times based on user preferences. | Control Properties for Accessibility The .NET Framework provides a number of accessibility- related properties for controls, including the following: -
AccessibleDescription property The description of the control, which will be reported to accessibility aids. -
AccessibleName property The control's name , which will be reported to accessibility aids. -
AccessibleRole property The control's role, which will be reported to accessibility aids. -
BackColor property and ForeColor property Use the default values to enable the user's selected screen colors. -
BackgroundImage property Leave this property empty to help users read text on your forms. -
Font Size property If the font size on your form is fixed, it should be set to at least 10 point (pt). -
TabIndex property Set this property for each control to ensure a sensible navigation path and to make sure shortcut keys work to access controls. -
Text property Use the ampersand character (&) to create shortcut keys and ensure keyboard access to controls. For example, suppose you have a TextBox control that you're using to display the total invoice amount for an order on a Windows form. Although you've placed a Label control with the Text property "Invoice Total" next to the TextBox control, that's not enough to make the form accessible. You should also set the AccessibleName property of the TextBox control to "Invoice Total TextBox" and set the AccessibleDescription property of the control to "Total Invoice Amount for This Order." These changes will make your form much easier for users who employ screen readers. Supporting High Contrast Mode Many users make use of the HighContrast property to make information more clearly recognizable. Your application can adjust its functionality based on the value of the Boolean SystemInformation.HighContrast property. An event handler for the SystemEvents.UserPreferenceChanged event can allow your application to change its operation when the HighContrast property changes. To make effective use of High Contrast mode, your application should do the following: -
Use only system colors to display controls. -
Add visual cues, such as a bold font face or special icons, to enhance information rather than using color. -
Remove background images or patterns. |