You are here

Flash and JAWS/Accessibility

Submitted by Karthik on 9 December, 2005 - 19:02

Getting Flash to be MSAA accessible is a chore in itself. And if you are converting a poorly written app to be accessible, welcome to hell :/

For my own reference, and due to the lack of any practical documentation on the net, here are a few things to keep in mind. Also, these were primarily tested with JAWS, a popular MSAA compliant screen reader. I'm just extemporising here, so feel free to correct any errors or recommend stuff I've left out (by adding a comment) and I'll edit it in..

JAWS:

  • To start off with, I was just not able to get JAWS (v7.00.135U trial) reading SWFs on XP SP2 [two different boxes], with any browser and any version of the Flash player. I eventually had to get a clean install of Win2k SP4 going to get it working. Why this is, I have no idea, but, I do know for a fact that others have had the same version working fine on XP..
  • Before installing JAWS [too late? :P], if you care to do so, save your current Windows theme as a new theme. JAWS messes around with icon sizes etc. without warning, and you can get your PC back to its pristine state by just reselecting your saved theme.
  • JAWS does not exactly possess the best designed UI in the world - accessible or not - and I'm being kind to it when I say so. There also seems to be a lot of confusion on its basic controls. The only controls (on a desktop) that should concern you should be:
    • Ins + Down Arrow: Read page.
    • PgUp: Go to the top of the page.
    • Ctrl: Shut up.

    The first two are to be used on the number keypad, with NumLock off. The Ins key is known as the "JAWS key".

Getting your SWF accessible:

  • Links to read/Stuff to get:
  • Besides the general practices outlined in Bob Regan's PDF, the things to be aware/wary of to get reading/tabbing orders right [in no particular order]:
    • Turn OFF "global" auto labelling, esp. if you are just starting off on the project. Doing everything manually will be the easiest to manage and debug.
    • Completely avoid using the accessibility panel as much as possible.
    • Never use static text fields. Always use dynamic/input, and give them instance names.
    • Prefer to use buttons over movieclips for keyboard controls.
    • If you have to tween, always make sure that MC/button in every keyframe has the same instance name.
    • While the tab order can be specified via the accessibility panel, the reading order can not. So it is best to assign everything via AS.
    • If you are targeting the F7 or F6 players, you have to make sure that *every* accessible element in the frame is given a reading order. This is not the case with the Flash 8 player, where elements with assigned reading orders take precedence [I haven't tested this].
    • Keep in mind that screen readers do not understand heirarchy in a SWF. They just read the elements on the screen as a flat file. Therefore, as mentioned above, *all* elements on the screen have to be given a tab/reading order via AS regardless of how deeply nested they are. So, if a_mc has a reading order of 10, and b_mc has a 100 ridiculously nested clips. If any one of these child clips of b_mc has an accessible element somewhere without a reading order, then the entire reading order of the SWF will collapse. Conversely, if any one of these child clips of b_mc has a textfield with a reading order of 1, it will be read before a_mc.
    • Don't waste your time testing things with the screen reader until you are satisfied with everything via the Accessibility Explorer. This will save you an immense amount of time.
    • Lastly, don't forget to Accessibility.updateProperties(); :)
  • Screen readers at the present moment do not recognise screen refreshes. Therefore, the end user has to constantly trigger the screen reader manually. However, unlike javascript etc. Flash, using the Accessibility.isActive method can detech the presence of a screen reader. This can very likely be used to add in an alert sound (for e.g.) upon a screen refresh. Or alternatively, this can be used to load a different SWF with heavy accessibility..

-K

AttachmentSize
Binary Data sanitise.jsfl3.48 KB
Binary Data inaccessify.jsfl1.15 KB

Comments

I've just attached a couple of utililty scripts that will very likely help ease some of the pain :) You will need to log in to access these files..

sanitise.jsfl : This loops through all scenes and all movieclips in the library and converts static textfields to dynamic.

inaccessify.jsfl : Makes selected elements on the stage inaccessible, and assigns/removes their instance names. Very handy when used in tandem with the "multiple frame" selector.

Also, static and dynamic fields without tab indices seem to be assigned pseudo-random indices by Flash. So, consider for e.g., that you have buttons a_btn and b_btn on the stage, along with a couple of textfields. You now want to set the reading order as a_btn, textfields, b_btn. But you want to do this without assigning the textfields any tab indices. But since these textfields are assigned their own tab indices, choosing an arbitrarily high number for b_btn's tab index should provide the required result.

Rather quirky, but handy. This has been tested only in the F8 player.

-K