Accessibility: Strategies for accessibility in Flash

May 9, 2005

Here are some strategies to make Flash applications and content accessible to different disability types:

Hearing disabilities

  • Provide audio narration when needed
  • Provide captions for audio narrations

Photo epilepsy

  • Remove strobing content that flashes between 2 and 55 times per second

Motor disabilities

  • Ensure the Flash content is keyboard accessible

Cognitive disabilities

  • Give users control over time sensitive content
  • Provide easy to use controls and navigation schemes
  • Be consistent
  • Use the clearest, simplest language appropriate to the content

Low vision

  • Be sure to have significant contrast between foreground and background colors to assist users who have difficulty seeing particular colors
  • Avoid using light gray text on a white background as users can have trouble reading it
  • Allow the Flash content to scale to a larger size

Blindness

  • Ensure screen reader accessibility
  • Ensure keyboard accessibility
  • Do not interfere with screen reader audio or keyboard commands
  • Provide textual equivalents for all non-text elements that convey content or provide a function.

Color Blindness

  • Avoid using color to communicate information or directions to users. Color blind users will not be able to operate the flash page

Checking for Accessibility

Accessibility.isActive();

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. Call this method 1 –2 seconds into your timeline as there is a slight communication delay between the flash player and accessibility aid upon initialization.

System.capabilities.hasAccessibility;

Read only property. Returns a Boolean value that if returns true the player is running in an environment that supports communication between Flash Player and accessibility aids.

Accessiblity Properties

instanceName._accProps.propertyName

Lets you control screen reader accessibility options for SWF files, movie clips, buttons, dynamic text fields, and input text fields at runtime.

Property Name/Data Type/Definition

.silent / Boolean / Make Movie or Object Accessible
.forceSimple / Boolean / Make Child Objects Accessible1
.name / String / Name2
.description / String / Description
.shortcut / String / Keyboard Shortcut3

1. Avoid setting this property to true as it will make every symbol contained in a movie clip accessible.
2. Please note that Name has a max character length of 256.
3. You will have to create the keyboard shortcut. Flash does not check that the ActionScript to code the keyboard shortcut has been created.

Accessibility.updateProperties();

Causes all changes to accessibility properties of objects to take effect. Only one call to Accessibility.updateProperties() is necessary.

Sample:

if (instanceName._accProps == undefined ) {
instanceName._accProps = new Object();
}
// Properties
instanceName._accProps.name = “Name goes here”;
instanceName._accProps.description = “Description goes here”;
instanceName._accProps.shortcut = “Ctrl+7”;
// Update properties
Accessibility.updateProperties();

Reading Text Fields

For screen readers to read contents of a dynamic or input text field, have the accessibility .description property equal to the value of the dynamic or input field.

* Note that static text fields are not accessible and screen readers do not recognize these fields.

inputTextField._accProps.description = inputTextField.text;

If the contents of a dynamic or input field are empty, you may do the following:

if (inputTextField.text == “”) {
inputTextField._accProps.description = “textfield name. this field is empty.”;
} else {
inputTextField._accProps.description = “textfield name. Textfield contains “+inputTextField.text;
};

Reading Order

  • You must use ActionScript to assign a tab index to every instance. Avoid using the Accessibility panel to specify the tab index.
  • You must create a tab index for every accessible object, not just the focusable objects. Do not miss ordering a single accessible instance in your SWF file, or the reading order reverts to the default reading order which can be unpredictable.
  • Avoid using invisible buttons, screen readers do not recognize these buttons.
  • Avoid having child objects accessible in movie clips

_this.instanceName.tabIndex = 1;
_this.instanceName.tabIndex = 2;

Components

When you’re building an application in Flash, you’ll need to add one line of code for each component, and set the accessibility parameters in the Accessibility panel. Accessibility for components works the same way as it works for all Flash movie clips.

mx.accessibility.componentInstanceName.enableAccessibility();

Screen readers support the folloring components: Alert, Button, CheckBox, ComboBox, DataGrid, Label, ListBox, RadioButton, TextArea, TextInput, Window

Accessibility Aids using the Flash 6+ player:

  • JAWS
  • Window-Eyes
Advertisements

One Response to “Accessibility: Strategies for accessibility in Flash”

  1. stelt Says:

    Where Flash requires extra work for accessibility, SVG gets (some) accessibility for free. Check out http://svg.startpagina.nl


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: