Choosing names for buttons, text fields, and entire Flash applications

You can use the Accessibility panel to assign names to buttons and input text fields so that they are identified appropriately by the screen reader. There are two ways of doing this:

Using automatic labeling

Flash automatically gives an appropriate name to a button or input text field in your document, as a text label that you have placed on top of, inside, or near a button or another text field. Labels for buttons must appear within the bounding shape of the button. For the button in the following illustration, most screen readers would first read the word button, then read the text label Home. The user could press Return or Enter to activate the button.

A form might include an input text field where users enter their names. A static text field, with the text Name appears next to the input text field. When Flash Player discovers an arrangement like this, it assumes that the static text object is a serving as a label for the input text field.

For example, when the following part of a form is encountered, a screen reader reads "Enter your name here."

In the Accessibility panel, you can turn off automatic labeling if it is not appropriate for your document. You can also turn off automatic labeling for specific objects within your document. See Turning off automatic labeling for an object and specifying a name.

Providing a name for an object

If you do not want to use automatic labeling for the entire application, you can turn it off and provide names for the objects in the Accessibility panel. If you have automatic labeling turned on, you can also select specific objects and provide names for the objects in the Name text box in the Accessibility panel so that the name is used instead of the object text label.

When a button or input text field doesn't have a text label, or when the label is in a location that Flash Player can't detect, you can specify a name for the button or text field. You can also specify a name if the text label is near a button or text field, but you don't want that text to be used as that object's name.

For example, in the following graphic, the text that describes the button appears outside and to the right of the button. In this location, Flash Player does not detect the text and it is not read by the screen reader.

To rectify this, open the Accessibility panel and select the button and enter the desired name (like "left arrow") and description (like "Go to previous page") in the Name and Description text boxes, respectively. To prevent repetition, make the text object inaccessible.

Note: An object's accessibility name is unrelated to the ActionScript instance name or ActionScript variable name associated with the object. For information on how ActionScript handles instance names and variable names in text fields, see About text field instance and variable names. (This information generally applies to all objects.)

To specify a name and description for a button, text field, or entire Flash application:

  1. Do one of the following:
    • To provide a name for a button or text field, select the object on the Stage.
    • To provide a name for an entire Flash application, deselect all objects on the Stage.
  2. Do one of the following:
    • Select Window > Property inspector if the inspector is not visible. In the Property inspector, click the Accessibility button.
    • Select Window > Other Panels > Accessibility.
  3. In the Accessibility panel, make sure that the Make Object Accessible (for buttons or text fields) or Make Movie Accessible (for entire Flash applications) option is selected (the default setting).
  4. Enter a name for the button, text field, or Flash application in the Name text box.
  5. Enter a description for the button, text field, or Flash application in the Description text box.

To define accessibility for a selected object in a movie:

  1. Select the object on the Stage and do one of the following:
    • Select Window > Property inspector if the inspector is not visible. In the Property inspector, click the Accessibility button.
    • Select Window > Other Panels > Accessibility.
  2. In the Accessibility panel, do one of the following:
    • Select Make Object Accessible (the default setting) to expose the object to screen readers, and to enable other options in the panel.
    • Deselect Make Object Accessible to hide the object from screen readers. This disables the other options in the panel.
  3. Enter information for the selected object as needed:

    Dynamic text Enter a name for the text object in the Name text box, and an optional description of the text in the Description text box. (To provide a description for static text, you must convert it to dynamic text.)

    Input text fields or buttons Enter a name for the object. Enter a description of the object in the Description text box. Enter a keyboard shortcut in the Shortcut text box.

    Movie clips Enter a name for the object. Enter a description in the Description text box. Select Make Child Objects Accessible to expose the objects inside the movie clip to screen readers.

    Note: If your application can be described in a simple phrase of text that can be easily conveyed by a screen reader, turn off the Make Children Accessible option for your document, and type in a suitable description.

Specifying advanced accessibility options for screen readers

Flash provides several accessibility authoring features that go beyond simply providing names for objects. In addition to providing descriptions for text or text fields, buttons, or movie clips, and keyboard shortcuts for input text fields or buttons, you can also turn off automatic labeling behavior for your document.

You can choose to hide a selected object from screen readers. For example, you should hide objects that are repetitive or do not convey information. You may also decide to hide accessible objects that are contained inside a movie clip or Flash application, and expose only the movie clip or Flash application itself to screen readers.

Turning off automatic labeling for an object and specifying a name

You can specify a name for an individual object if automatic labeling does not provide the correct information.

To turn off an automatic label for an individual object and specify a name for it:

  1. On the Stage, select the button or input text field for which you want to control labeling.
  2. Do one of the following:
    • Select Window > Property inspector if the inspector is not visible. In the Property inspector, click the Accessibility button.
    • Select Window > Other Panels > Accessibility.
  3. In the Accessibility panel, select Make Object Accessible (the default setting).
  4. Enter a name for the object in the Name text box.

    The name is read as the label for the button or text field.

  5. To turn off accessibility for the automatic label (and hide it from screen readers), select the text object on the Stage.
  6. If the text object is static text, convert it to dynamic text: in the Property inspector, select Dynamic Text from the Text type pop-up menu.
  7. In the Accessibility panel, deselect Make Object Accessible.

Hiding an object from the screen reader

You can hide an object from the screen reader simply by turning off accessibility for the object. You should only hide objects that are repetitive or convey no content. When an object is hidden, the screen reader ignores the object.

  1. On the Stage, select the button or input text field you want to hide from the screen reader.
  2. Do one of the following:
  3. In the Accessibility panel, do one of the following:

Creating a keyboard shortcut

You can create a keyboard shortcut for an object, such as a button, so users can quickly navigate to it without listening to the contents of an entire page. For example, you can create a keyboard shortcut so users can quickly navigate to a menu, a toolbar, the next page, or a submit button.

There are two steps to create a keyboard shortcut:

Keyboard shortcut functionality also depends on the screen reader software used. Be sure to test your Flash content with multiple screen readers. The key combination Control+F, for example, is a reserved keystroke for both the browser and the screen reader. The arrow keys are also reserved by the screen reader. Generally, you can use the keys 0-9 on the keyboard for keyboard shortcuts. However, even those are increasingly used by screen readers, so it is very important to test your keyboard shortcuts. See Testing accessible content.

To indicate the name of a keyboard shortcut for the screen reader:

  1. On the Stage, select the button or input text field for which you want to create a keyboard shortcut.
  2. Do one of the following:
    • Select Window > Property inspector if the inspector is not visible. In the Property inspector, click the Accessibility button.
    • Select Window > Other Panels > Accessibility.
  3. In the Shortcut field, type the name of the keyboard shortcut, using the following conventions:
    • Spell out key names, such as Control or Alt.
    • Use capital letters for alphabetic characters.
    • Use a plus sign (+) between key names, with no spaces—for example, Control+A.

    Warning: No checking is done by Flash to check that the ActionScript to code the keyboard shortcut has been created.