With knowledge of a few design techniques and accessibility features in Macromedia Flash Basic 8 and Macromedia Flash Professional 8, you can create Flash content that is accessible to all users, including those with disabilities.
This lesson demonstrates how to create an accessible document, designed for use with screen readers (which read web content aloud for visually impaired users) and other assistive technologies.
First, you'll open the start file for the lesson and set up your workspace to use an optimal layout for taking lessons.
1. | To open your start file, in Flash select File > Open and navigate to the file:
|
2. | Select File > Save As and save the document with a new name, in the same folder, to preserve the original start file. Note As you complete this lesson, remember to save your work frequently. |
3. | Select Window > Workspace Layout > Default to set up your workspace for taking lessons. |
You'll now specify that your document is accessible to screen readers, and provide a name and description of your document that a screen reader can read aloud.
1. | With nothing selected on the Stage, select Window > Other Panels > Accessibility. |
2. | In the Accessibility panel, verify that the following options are selected: Make Movie Accessible is selected by default and allows Flash Player to pass accessibility information to a screen reader. Make Child Objects Accessible allows Flash Player to pass accessibility information nested inside a movie clip to a screen reader. If this option is selected for the entire document, you can still hide child objects for individual movie clips. Auto Label associates text next to another Stage object, such as an input text field, as a label or title for that element. |
In the Accessibility panel for the document, you can enter a name and description for your document for screen readers.
In the Name text box, enter Trio ZX2004. In the Description text box, enter Corporate website about the Trio ZX2004. Includes 6 navigation buttons, overview text, and an animated car.
Now that you've provided information about the entire document, you can provide information about Stage objects included in the document.
1. | Select the Trio Motor Company logo along the top of the Stage. In the Accessibility panel, enter Trio Motor Company in the Name text box. Do not enter anything in the Description text box. Not every instance needs a description, which is read with the title information. If the title name sufficiently describes the function of the object, you don't need to include a description. |
2. | With the Accessibility panel still open, select the Dealers button on the Stage. Information in the Accessibility panel changes to reflect Accessibility options for the selected object. In the Accessibility panel for the Dealers button, you do not need to provide a name in the Title text box, because the button includes a text label that the screen reader will read. If you did not want the screen reader to read the text in the button, you could deselect Auto Label when you set up accessibility for the document. |
3. | In the Description text box, enter Links to a web page with information about dealers nationwide. |
The other buttons also include text, which the screen reader will read aloud; therefore, you do not need to provide a title. Since the title of the buttons is fairly self-explanatory, there's no need for you to include descriptions.
Screen readers follow a specific order when reading web content. However, when content on the web page changes, most screen readers will begin reading the web content all over again. This screen reader feature can be problematic when Flash content contains, for example, animation, which could cause the screen reader to begin again each time there's a change in the animation.
Fortunately, you can use the Accessibility panel to either deselect Make Object Accessible, so that the screen reader does not receive accessibility information about the object, or deselect Make Child Objects Accessible, so that the screen reader does not receive accessibility information nested within a movie clip. You'll now do the latter so that users will know the web page contains an animation, and the animation won't cause the screen reader to constantly refresh.
1. | On the Stage, click the car, which is the safety_mc movie clip instance. |
2. | In the Accessibility panel, deselect Make Child Objects Accessible. In the Name text box, enter Trio ZX2004 animation. In the Description text box, enter Animation that includes three views of the Trio ZX2004. |
Static text is accessible to screen readers. However, you cannot provide static text with an instance name, which is required to control the tab order and reading order. You'll change the overview text paragraph to dynamic text and specify accessibility options.
1. | On the Stage, select the text that begins "The TRIO ZX2004 provides the ultimate in efficiency...." The Accessibility panel changes to indicate that you cannot apply accessibility features to this selection. |
2. | In the Property inspector, select Dynamic Text from the Text Type pop-up menu. Accessibility settings now appear in the Accessibility panel. |
3. | In the Instance name text box, enter text9_txt. |
Note
To specify a tab order and reading order, which you'll do next, you must provide an instance name for all instances. The instance name must be unique in your document.
You can create a tab order that determines the order in which objects receive focus when the users press the Tab key. You can also control the order in which a screen reader reads information about the object (known as the reading order). You can create both the tab and reading order using the tabIndex property in ActionScript (In ActionScript, the tabIndex property is synonymous with the reading order). If you have Flash Professional 8, you can use the Accessibility panel to specify the tab order, but the tab index that you assign does not necessarily control the reading order.
To create a reading order, you must assign a tab index to every instance in ActionScript.
If you have Flash Professional, creating a tab order is as easy as entering a number in the Tab Index text box. You can then view the tab order directly on the Stage.
To create a tab order in this lesson, use one of the following procedures. To create a reading order along with a tab order, follow the procedure to control the tab order and reading order using ActionScript.
If you have Flash Professional 8, you can follow this procedure to create a tab order using the Accessibility panel:
1. | With the Accessibility panel open, select the logo_mc instance at the top of the Stage. In the Accessibility panel, enter 1 in the Tab Index text box. | |||||||||||||||||||||||||||||||||||||||
2. | Continue to select each instance on the Stage and enter a tab order number in the Tab Index text box, using information from the following table:
|
If you have Flash Professional 8, follow this procedure to view a tab order:
Select View > Show Tab Order.
The tab index number that you entered appears next to the instance on the Stage.
Note
A tab order created with ActionScript, rather than the Accessibility panel, does not appear when Show Tab Order is enabled.
Follow this procedure to control the tab order and reading order using ActionScript:
1. | In the Timeline, select Frame 1 of the Actions layer. |
2. | In the Actions panel (Window > Actions), view the ActionScript that creates the tab index for each instance in the document. |
3. | If you're using Flash Basic 8, or if you're using Flash Professional 8 and you did not create the tab index using the Accessibility panel, delete the /* and */ in the script to uncomment the script: this.logo_mc.tabIndex = 1; this.dealers_btn.tabIndex = 2; this.orders_btn.tabIndex = 3; this.research_btn.tabIndex = 4; this.text4_txt.tabIndex = 5; this.overview_btn.tabIndex = 6; this.powerplant_btn.tabIndex = 7; this.news_btn.tabIndex = 8; this.safety_mc.tabIndex = 9; this.text8_txt.tabIndex = 10; this.text9_txt.tabIndex = 11; this.bevel_mc.tabIndex = 12; |
You already know the importance of regularly testing your Flash document as you create it to ensure it performs as expected. Frequent testing is even more important when you design a document to work with assistive technologies such as screen readers. In addition to testing tab order in your SWF file, you should also test your tab order in various browsers; some browsers differ in how the user tabs to or out of Flash content. For information about resources to test your document with a screen reader, see "Testing accessible content" in Flash Help.
Congratulations on creating accessible Flash content. In a few minutes, you learned how to accomplish the following tasks:
Specify that your document is accessible to screen readers
Provide a document title and description
Provide a title and description for document instances
Specify that screen readers ignore elements in your document
Change static text to dynamic text for accessibility
Control the order in which users navigate with the Tab key
Control the reading order with ActionScript
Macromedia maintains an extensive website devoted to accessibility. For more information about accessibility with Macromedia products, see the Macromedia accessibility website at www.macromedia.com/macromedia/accessibility.
discuss this topic to forum
