Lesson 3: Implementing Accessibility

Lesson 3: Implementing Accessibility

When designing your applications, you must take all potential users into account. For many applications, business and otherwise, this includes people who experience difficulty using the standard user interfaces provided by most Windows Forms applications. By designing your applications to be accessible, you can increase your user base and the usefulness of your programs.

After this lesson, you will be able to

  • Describe the basic principles of designing for accessibility

  • Explain the accessibility requirements for the Certified for Windows logo program

  • Describe the accessibility properties of standard Windows Forms controls and their roles

Estimated lesson time: 20 minutes

People with accessibility requirements are a significant part of the workforce. In order to meet the needs of today s business application programming, applications must be accessible to people with different needs.

Microsoft Windows XP provides a variety of accessibility aids designed to integrate seamlessly with your applications and provide an accessible user experience. For example, SoundSentry allows the user to specify a visual cue whenever the system emits a sound. Additionally, there are accessibility principles you can design into your application.

Accessibility Design

An application begins to be accessible in the design phase. By planning ahead, you can create an application that integrates the principles of accessible design into the user interface. Some of these principles are

  • Flexibility

  • Choice of input methods

  • Choice of output methods

  • Consistency

  • Compatibility with accessibility aids

Flexibility is a key principle in accessibility design. Users should be able to customize the user interface to their specific needs. They also should be able to choose from a variety of input methods, such as pointing devices or keyboards. The application should provide keyboard access to the application s important features and mouse-click access for common tasks. Likewise, users should have a choice of output methods and be able to choose between sound, visual cues, graphics, and text. Your application should interact in a consistent manner with other applications and within its own operation. In addition, your application should be compatible with accessibility aids.

Accessibility and the Certified for Windows Program

In order to provide standard guidelines for designing accessible applications, Microsoft has incorporated five requirements for applications to be certified in the Certified for Windows program. This section discusses the requirements for the Certified for Windows program and how to implement them.

Support Standard System Settings

The first requirement for certification states that applications must support standard system settings for size, color, font, and input. This ensures that all of a user s applications have a consistent user interface that will inherit the look and feel provided by the system settings. Thus, users with accessibility needs can configure their systems once, and all of their applications will automatically adopt a consistent appearance.

You can implement this requirement in your applications by using System objects exposed through the .NET Framework. The .NET Framework provides a palette of system colors that can be used to set your application s colors. When the system settings change, the colors of your application s user interface will change. Similarly, you can leave the font determination up to the system by not explicitly setting the Font property for your controls. If the Font property is not changed from its default value, it will conform to the system font settings. The exception to this is the Font.Size property, which can be changed while maintaining accessibility. You should design your application so that it can be used on a screen with 640 x 480 resolution and should not require any special input methods beyond the keyboard and pointing devices.

Ensure Compatibility Using the High Contrast Option

Users requiring a high degree of legibility will select the High Contrast option. This option sets the Windows color scheme to a scheme that provides maximum contrast between light and dark portions of the user interface.

You can ensure that your application conforms to the High Contrast option requirement by only using system colors or colors chosen by the user. Thus, when the High Contrast option is chosen, your application will conform. Additionally, you should avoid using background images for your forms, because they decrease contrast and legibility.

Provide Documented Keyboard Access to All Features

Your application should implement keyboard access for all features, and this access should be documented and discoverable. The use of shortcut keys to access controls and menu items, as well as setting the Tab order, allows you to implement keyboard access for your user interface features. The importance of documentation for these features cannot be overlooked. A user must have some means of discovering keyboard access for features and this should be provided through careful, complete, and well-organized documentation.

Provide Notification of the Keyboard Focus Location

The location of the keyboard focus is used by accessibility aids such as Magnifier and Narrator. Thus, it is important that the user and the application always have a clear understanding of where the focus is. For the most part, this is facilitated by the .NET Framework. When designing your program flow, however, you should always incorporate code to set the focus to the first control on a form when the form is first displayed, and the tab order should be set to provide logical program flow.

Convey No Information by Sound Alone

Your applications should never rely on sound to convey important information. Although sound is an important cue for some users, others might be unable to perceive an audio alert. When using sound to convey information, you should combine the notification with visual cues, such as flashing the background color of the active window, displaying a MessageBox notification, or using a non-modal screen that displays information while the application continues to execute.

Accessibility Properties of Windows Forms Controls

In addition to properties that affect the visual interface of a control, each Windows Forms control has five properties related to accessibility that determine how a control interacts with accessibility aids. These properties are summarized in Table 8.2.

Table 8-2. Accessibility Properties of Windows Forms Controls

Property

Description

AccessibleDescription

Contains the description that is reported to accessibility aids.

AccessibleName

Contains the name that is reported to accessibility aids.

AccessibleRole

Contains the role of the control that is reported to accessibility aids.

AccessibilityObject

Contains an instance of AccessibleObject, which provides information about the control to usability aids. This property is read-only and is set by the designer.

AccessibleDefaultActionDescription

Contains a description of the default action of a control. This property cannot be set at design time and must be set in code.

These properties provide information to accessibility aids about the role of the control in the application. Accessibility aids can then present this information to the user or use this information to make decisions on how to display the control.

The AccessibilityObject property contains the AccessibleObject class instance that provides information to accessibility aids. The AccessibleName, AccessibleDescription, and AccessibleDefaultActionDescription properties contain information that accessibility aids can use to describe your user interface. The AccessibleRole property contains an enum value that determines how an accessibility aid treats your control. This property is normally set to (Default), which indicates that each control is acting in its usual manner. It is important to set this property, however, when a control is acting in a manner more consistent with another type of control, or for custom controls. For example, if you have a custom control that displays data in a chart form, you would set the AccessibleRole property value to Chart. The accessibility aids would then treat the control as a chart.

Lesson Summary

  • When designing for accessibility, keep the following principles in mind:

    • Flexibility

    • Choice of input methods

    • Choice of output methods

    • Consistency

    • Compatibility with accessibility aids

  • The Certified for Windows logo program has the following accessibility requirements for applications:

    • Support standard system settings

    • Be compatible with High Contrast mode

    • Provide documented keyboard access for all user interface features

    • Provide notification of the focus location

    • Convey no information by sound alone

  • Windows Forms controls expose the following properties related to accessibility:

    • AccessibleDescription

    • AccessibleName

    • AccessibleRole

    • AccessibilityObject

    • AccessibleDefaultActionDescription



MCAD(s)MCSD Self-Paced Training Kit(c) Developing Windows-Based Applications With Microsoft Visual Basic. Net a[.  .. ]0-316
MCAD(s)MCSD Self-Paced Training Kit(c) Developing Windows-Based Applications With Microsoft Visual Basic. Net a[. .. ]0-316
ISBN: 735619263
EAN: N/A
Year: 2003
Pages: 110

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net