Configuring Flex applications for accessibility

Enabling accessibility in Flex

By default, Flex accessibility features are disabled. When you enable accessibility, you enable the application to communicate with a screen reader.

You can use one of the following methods to enable accessibility:

  • Enable accessibility by default for all Flex applications so that all requests return accessible content.

    To enable accessibility for all Flex applications, edit the flex-config.xml file to set the accessible property to true, the default value, as the following example shows:

    <compiler> 
        ... 
        <accessible>true</accessible> 
        ... 
    <compiler>
  • Enable accessibility in Adobe Flash Builder project properties.

    If you are using Adobe Flash Builder to develop Flex applications, you can enable accessibility by selecting the Generate accessible SWF file option in the Flex Compiler section of the project properties dialog. When you select this option, the compiler node within the .actionScriptProperties file located in the project directory is modified to generate accessible SWF files:

    <compiler additionalCompilerArguments="-locale en_US" 
        generateAccessible="true">
  • Enable accessibility by using the mxmlc command-line compiler.

    When you compile a file by using the mxmlc command-line compiler, you can use the ‑accessible option to enable accessibility, as the following example shows:

    mxmlc -accessible c:/dev/myapps/mywar.war/app1.mxml

    For more information on the command-line compiler, see Flex compilers.

    When you compile a file by 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
If you are building applications for Adobe LiveCycle Data Services ES and are deploying the application as MXML files, you can enable accessibility on an individual request by setting the accessible query parameter to true, as the following example shows:
http://www.mycompany.com/myflexapp/app1.mxml?accessible=true

If you edited the flex-config.xml file to enable accessibility by default, you can disable it for an individual request by setting the accessible query parameter to false, as the following example shows:

http://www.mycompany.com/myflexapp/app1.mxml?accessible=false

For more information on the command-line compiler, see Flex compilers.

Configuring a JAWS screen reader for Flex applications

To use the JAWS screen reader with a Flex application, users must download scripts from the Adobe accessibility website before invoking a Flex application. Screen readers work best when in Forms mode, which lets users interact directly with the Flex application. These scripts let users switch between Virtual Cursor mode and Forms mode by using the Enter key from almost anywhere within a Flex application. If necessary, users can exit Forms mode by using the standard JAWS keystrokes.

Users can download these scripts, and the installation instructions, from the Adobe website at www.adobe.com/go/flex_accessibility.

To verify that the Flex scripts for JAWS are correctly installed, users can press the Insert+Q keys when JAWS is running. If the scripts are installed correctly, users hear "Updated for Adobe Flex 4" in the voice response to this keystroke.

It is important that you direct users with visual impairments to the script download page so that they have the necessary scripts to use JAWS effectively.