Top Level

Class Accessibility


public class Accessibility
extends Object

Player version: Flash Player 6

The Accessibility class manages communication with screen readers. Screen readers are a type of assistive technology for visually impaired users that provides an audio version of screen content. The methods of the Accessibility class are static--that is, you don't have to create an instance of the class to use its methods.

To get and set accessible properties for a specific object, such as a button, movie clip, or text field, use the _accProps property. To determine whether the player is running in an environment that supports accessibility aids, use System.capabilities.hasAccessibility.

See also
System.capabilities.hasAccessibility, _accProps

Property Summary

Properties inherited from class Object
__proto__, __resolve, constructor, prototype

Method Summary
static isActive() : Boolean
Indicates whether an accessibility aid is currently active and the player is communicating with it.
static updateProperties() : Void
Causes all changes to _accProps (accessibility properties) objects to take effect.

Methods inherited from class Object
addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch

Method Detail

isActive Method

public static isActive() : Boolean

Player version: Flash Player 6

Indicates whether an accessibility aid is currently active and the player is communicating with it. Use this method when you want your application to behave differently in the presence of a screen reader or other accessibility aid.

Note: If you call this method within one or two seconds of the first appearance of the Flash window in which your document is playing, you might get a return value of false even if there is an active Microsoft Active Accessibility (MSAA) client. This is because of an asynchronous communication mechanism between Flash and MSAA clients. You can work around this limitation by ensuring a delay of one to two seconds after loading your document before calling this method.

Boolean — A Boolean value: true if the Flash Player is communicating with an accessibility aid (usually a screen reader); false otherwise.

The following example checks whether an accessibility aid is currently active:
if (Accessibility.isActive()) {
    trace ("An accessibility aid is currently active");
} else {
    trace ("There is currently no active accessibility aid");

See also
Accessibility.updateProperties(), _accProps, System.capabilities.hasAccessibility

updateProperties Method

public static updateProperties() : Void

Player version: Flash Player 6,0,65,0

Causes all changes to _accProps (accessibility properties) objects to take effect. For information on setting accessibility properties, see _accProps.

If you modify the accessibility properties for multiple objects, only one call to Accessibility.updateProperties() is necessary; multiple calls can result in reduced performance and unintelligible screen reader results.

If you change an image and want to update its accessible description, you could use the following ActionScript code:

if (my_mc._accProps == undefined ) {
    my_mc._accProps = new Object();
} = "Photo of Mount Rushmore";

See also
Accessibility.isActive(), _accProps, System.capabilities.hasAccessibility