To accelerate the development of accessible applications, Adobe® Flex® includes 28 components with built-in accessibility support. These automate many of the most common accessibility practices, such as providing text equivalents, labeling controls, and promoting keyboard access. Using these components helps ensure a consistent user experience across rich Internet applications (RIAs).
Components are not accessible to assistive technology users by default. Accessibility must be enabled for the entire Flex server or on an application-by-application basis. Enabling accessibility is easy, however. There are four strategies for enabling Flex application accessibility:
-
Enable accessibility by default for all Flex applications
To enable accessibility for all Flex applications compiled, edit the flex-config.xml file to set the<accessible>attribute totrue, as shown in the following example:<mxml-compiler> ... <accessible>true</accessible> ... </mxml-compiler>
-
Enable accessibility in the Adobe Flex Builder™ project properties
If you are using Adobe Flex Builder software to develop Flex applications, you can inform the compiler to enable accessibility by selecting the "Generate accessible SWF file" option in the Flex Compiler section of the project properties dialog box.
The impact of selecting this option is that the compiler node within the .actionScriptProperties file located in the project directory will be modified to indicate the need for accessible SWF file generation.
<compiler additionalCompilerArguments="-locale en_US" generateAccessible="true"> … -
Enable accessibility using the command-line compiler
When you compile a file using the mxmlc command-line compiler, you can use a configuration variable to notify the compiler to generate the SWF file with accessibility enabled. The command-line syntax for the mxmlc.exe compiler allows the addition of –compiler.accessible (or just –accessible) to enable accessibility, as shown in the following examples:mxmlc –compiler.accessible c:/dev/myapps/ appl.mxml mxmlc -accessible c:/dev/myapps/appl.mxml -
Enable accessibility for an individual application
If you have not enabled accessibility for all applications by default and the application is compiled at runtime, you can enable it on an individual application by appending the query parameter and value accessible=true as shown in the following example:http://www.mycompany.com/myflexapp/appl.mxml?accessible=true
Your specific development situation will determine which of the preceding methods is used. It is acceptable to provide end users with double links to the same application: one with accessibility enabled, another without. Developers may also opt to implement a check for an assistive technology device on the client system and redirect the user to an accessible version as needed.
There are additional considerations for some components. For example, it may be necessary to describe a component, make it silent, hide children of a component, assign a reading order, or create a shortcut key. To modify accessibility properties that apply to the entire document, create or modify the AccessibilityProperties object. Use the tabIndex property to determine the order in which objects receive input focus when users press the Tab key. The tabIndex property can also control the order in which a screen reader reads information about the object (known as the reading order).
For information about Flex 3 component behavior for keyboard and screen reader users, refer to the "Accessible components and containers" document in the Flex 3 Developer's Guide.
