As of this writing, Flash cannot be made as accessible as an HTML document.
This information is provided because Flash developers will continue to use Flash whether it is accessible or not. Until Flash can be made as accessible as HTML, please use all the accessiblity techniques available in the most current version of Flash. It’s not there yet, but it keeps getting better.
I’ve learned almost everything I know about Flash accessibility from Bob Regan, head of the Macromedia Accessibility team. Unfortunately, he no longer updates his blog, but you can still find the achives on Bob Regan’s Flash Accessibility web log.
- Text Alternatives
The Accessibility panel will be your main method of making Flash movies accessible to screen reader software. The graphic pictured above shows two contextual views of the Accessibility panel. The left side shows accessibility properties of the main movie (when the main stage is selected) and the right side shows the accessibility options of a typical item on the stage. We’ll discuss the checkboxes and “Shortcut” field later. For now, let’s consider the “Name” and “Description” fields.
Name is the equivalent of an
alt
ortitle
attribute in HTML. Use the Name field to provide alternative text for any images and graphics that do not already contain appropriate text. Any text typed directly into Flash will automatically be available for the screen reader.Description is the equivalent of the
longdesc
attribute in HTML. However, current screen reader implementations read both the Name and Description properties back-to-back, so consider that when presenting charts or graphs that require extended descriptive text.View Bob Regan’s articles Labeling Controls Part 1 and Labeling Controls Part 2 to understand the nuances of the Flash auto-labeling feature. Also read Describing an Entire Flash Movie to understand practical ways to label the main movie.
ActionScript programmers may wish to view the Accessible Product Rollover, Part 2 entry for an example of how to control Flash accessibility properties using ActionScript.
- Create a logical tab order with the
tabIndex
propertyThe ActionScript property
tabIndex
is the equivalent of thetabindex
attribute in HTML. Because Flash has no source code order like HTML, you’ll need to use this property in Flash quite a bit more than you will with HTML.As in HTML documents, you’ll need to create a logical tab order so that people accessing your Flash movie with a keyboard will be presented with a usable interface. This group of people includes vision-impaired, mobility-impaired, and non-disabled users who have a preference for the keyboard. Pay especially close attention to the tab order when presenting dynamic content or forms for Flash applications.
If necessary to maintain a logical tab order, set any Flash object’s tabIndex property to an integer. View Bob Regan’s discussions of Reading Order in Flash and Flash Reading Order Cases to understand how, when, and why to use
tabIndex
. - Shortcut
The contextual Accessibility panel contains a “Shortcut” field that is closely equivalent to an HTML
accesskey
attribute. However, we highly recommend not using this unless you have a complex web application that requires extensive keyboard control. Shortcuts have all the same drawbacks ofaccesskey
and are much more complex to implement. The method required to implement a keyboard Shortcut is outside the scope of this lesson. - Regarding child object accessibility
The left side of the graphic above shows the main movie’s accessibility properties. Unless your Flash movie provides no meaningful content, such as decorative banner, you’ll almost always want to leave these three boxes checked: Make Movie Accessible, Make Child Objects Accessible, and Auto Label.
The accessibility properties of objects on the stage will vary with the content. For example, you would want to make a control button accessible, but you would not want to make a decorative graphic accessible. The same principle applies when we use empty
alt
text for a spacer or decorative image in HTML:<img src="pretty_swirl.gif" alt="" />
The other main practical problem with accessible child objects is that if the Flash Player detects a change in an accessible object, it will tell the screen reader to start reading from the top again. This is somewhat equivalent in functionality to a HTML page refresh or a link to another HTML document. Bob Regan discusses this more in his blog entry, Requirements for Text Equivalents, but unfortunately the example file has become a victim of link rot and returns a “File not Found” error.
The surest way to avoid problems with accessible child objects is to test using Assistive Technology.
- Pitfalls of transparent hit areas
Bob Regan discusses transparent hit areas and how to fix the accessibility problems associated with them.
- Overcoming focus of Flash object in web pages
fscommand
hack (doesn’t work in all browsers)One way to relinquish a Flash object’s keyboard focus is to use the ActionScript
fscommand
function.fscommand
allows Flash to send a command to a browser’s JavaScript engine, which can then assign keyboard focus to another element in the HTML document. The accessibility issues with this method are that it relies on JavaScript an does not work in many browsers.Future implementations of the Flash Player may be able to access the HTML DOM directly, without this middle man technique.
- Skip flash object anchor in HTML
Using HTML page anchors, you can skip over a Flash object the same way you would provide a “Skip to main content” link. You may want to leave this “skip object” link visible for keyboard users who do not have vision impairments.
- More in Flash MX 2004?
As of this writing, I haven’t used Flash MX 2004. I do know that it provides certain accessibility updates, but I’m not sure the extent of the updates. One update I can speak for is that the latest Flash Player has fixed the “overcoming focus of Flash object” mentioned previously in this page.
For more information on Flash MX 2004, view Bob Regan’s announcement of Studio MX 2004 and his discussion of components and accessibility.