Adobe Flex 3 Help

Creating accessibility with ActionScript

For accessibility properties that apply to the entire document, use the flash.accessibility.AccessibilityProperties class. For more information on this class, see the Adobe Flex Language Reference.

The following table lists some of the relevant properties of the AccessibilityProperties class.

Property

Type

Description

description

String

Specifies a description for the component that is read by the screen reader.

forceSimple

Boolean

Hides the children of a component from a screen reader when set to true. The default value is false.

name

String

Specifies a description of the component that is read by the screen reader. When accessible objects do not have a specified name, a screen reader uses a generic word, such as Button.

shortcut

String

Indicates a keyboard shortcut associated with this display object.

silent

Boolean

Hides a component from a screen reader when set to true. The default value is false.

Modifying these properties has no effect by itself. You must also use the Accessibility.updateProperties() method to inform screen reader users of Flash Player content changes. Calling this method causes Flash Player to reexamine all accessibility properties, update property descriptions for the screen reader, and, if necessary, send events to the screen reader that indicate changes occurred.

When updating the accessibility properties of multiple objects at once, you must include only a single call to the Accessiblity.updateProperties() method. (Excessive updates to the screen reader can cause some screen readers to become too verbose.)

Implementing screen reader detection with the Accessibility.isActive() method

To create content that behaves in a specific way if a screen reader is active, you can use the ActionScript Accessibility.active property, which is set to a value of true if a screen reader is present, and false otherwise. You can then design your content to perform in a way that is compatible with screen reader use, such as by hiding child elements from the screen reader.

For example, you could use the Accessibility.active property to decide whether to include unsolicited animation. Unsolicited animation means animation that happens without the screen reader doing anything. This can be very confusing for screen readers.

For more information on the Accessibility class, see the Adobe Flex Language Reference.