_accProps

Availability

Flash Player 7.

Usage

_accProps.propertyName
instanceName._accProps.propertyName

Parameters

propertyName A accessibility property name (see description below for valid names).

instanceName The instance name assigned to an instance of a movie clip, button, dynamic text field, or input text field.

Description

Property; provides the ability to control accessibility options for movies, movie clips, buttons, and text fields (input and dynamic) at runtime. These options are available as properties, or fields, of _accProps and correspond to settings available in the Accessibility panel during authoring. In order for changes to these properties to take effect with the screen reader, you must call , _accProps, System.capabilities.hasAccessibilityAccessibility.updateProperties(), _accProps, System.capabilities.hasAccessibilityAccessibility.updateProperties().

The table below lists the names and types of each _accProps property, their equivalent settings in the Accessibility panel, and the kinds of objects that each property can be applied to. All of these properties are optional.

Property Type Equivalent in Accessibility panel Applies to
silent boolean Make Movie Accessible /Make Object Accessible(inverse logic) Whole moviesButtonsMovie clipsDynamic textInput text
forceSimple boolean Make Child Objects Accessible(inverse logic) Whole moviesMovie clips
name string Name Whole moviesButtonsMovie clipsInput text
description string Description Whole moviesButtonsMovie clipsDynamic textInput text
shortcut string Shortcut ButtonsMovie clipsInput text

Note: The Accesibility panel's Auto Label setting does not have a corresponding runtime equivalent.

When used without the instanceName parameter, changes made to fields of the _accProps property apply to the whole movie. For example, the following line of code sets the accessible name property for the whole movie to the string "Pet store", and then calls Accessibility.updateProperties() to effect that change.

_accProps.name = "Pet store";
Accessbility.updateProperties();

for the whopwhen used with the instanceName parameter, changes only apply to the specified instance. To

All of the above fields are optional. An absent boolean field is the same as a false value, and an absent string field is the same as an empty string. Fields already present may be deleted (using the delete operator) if they are no longer needed. If a field is supplied that does not apply to the type of Stage object to which the _accProps object is attached, there is no effect. If all fields present are no longer needed, the _accProps object itself may be deleted.

There is one field in the Accessibility panel whose value cannot be changed dynamically (Accessibility.updateProperties will ignore changes to it). This is the Auto Labeling field, which applies only to whole movies.

Examples

There is a small wrinkle related to automatic labeling. Automatic labeling is an existing feature (enabled by the Auto Labeling field, and on by default) whereby text objects that are (a) entirely inside buttons, or (b) close to input text fields and above or to the left of them, are assumed to be labels for the corresponding buttons or input text objects. When a label is found, it is used for the name of its corresponding button or input text object, rather than being exposed as an independent text object. If a button or input text object has a name of its own, provided using the Accessibility panel, the player always uses that name rather than looking for labels for that object. So here is the wrinkle: when a button or input text object has no initial .name property, and auto labeling is turned on, and a label is found and used for that object, and then later a .name property is assigned and Accessibility.updateProperties is called, the label will "pop out" and act like an ordinary independent text object. The reverse is not true: if a .name property for a button or input text object is deleted and Accessibility.updateProperties is called, the player will continue to consider that object ineligible for labeling. These issues are not likely to come up very often; the rule about "popping out" is just there so that text objects never disappear from the MSAA view, as would happen if a .name was assigned that hid a label and the label didn't pop out.

Here is some example ActionScript code that takes advantage of dynamic accessibility properties. This hypothetical code is from a non-textual icon button component that may change what icon it displays.

function setIcon( newIconNum, newTextEquivalent )
{
   this.iconImage = this.iconImages[ newIconNum ];
   if ( newTextEquivalent != undefined )
   {
      if ( this._accProps == undefined )
         this._accProps = new Object();
      this._accProps.name = newTextEquivalent;
      Accessibility.updateProperties();
   }
}

See also

Accessibility.isActive(), , _accProps, System.capabilities.hasAccessibilityAccessibility.updateProperties(), _accProps, System.capabilities.hasAccessibilityAccessibility.updateProperties(), System.capabilities.hasAccessibility