Accessibility


Object   |   +-Accessibility public class Accessibility extends Object

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.

Availability: ActionScript 1.0; Flash Player 6

See also

hasAccessibility (capabilities.hasAccessibility property), _accProps property

Property summary

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)


Method summary

Modifiers

Signature

Description

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 (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)


isActive (Accessibility.isActive method)

public static isActive() : Boolean

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.


Availability: ActionScript 1.0; Flash Player 6

Returns

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

Example

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

updateProperties (Accessibility.updateProperties method), _accProps property, hasAccessibility (capabilities.hasAccessibility property)

updateProperties (Accessibility.updateProperties method)

public static updateProperties() : Void

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.

Availability: ActionScript 1.0; Flash Player 6,0,65,0

Example

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

my_mc.gotoAndStop(2); if (my_mc._accProps == undefined ) {   my_mc._accProps = new Object(); } my_mc._accProps.name = "Photo of Mount Rushmore"; Accessibility.updateProperties();

See also

isActive (Accessibility.isActive method), _accProps property, hasAccessibility (capabilities.hasAccessibility property)



ActionScript 2.0 Language Reference for Macromedia Flash 8
ActionScript 2.0 Language Reference for Macromedia Flash 8
ISBN: 0321384040
EAN: 2147483647
Year: 2004
Pages: 113

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