Introducing FlashAid: Using Flash to improve accessibility in Ajax

This post is out of date: See my post on the latest version of FlashAid (1.0) for up-to-date information.

We were having a barbeque on the beach on Saturday night when Jeremy Keith from Clearleft told us of an idea he had had for improving accessibility in Ajax applications by exposing, from a Flash application, the ability to detect whether accessibility features are installed on the user's computer. I had taken this feature for granted and didn't realize that the Ajax world was forced to live without it. Jeremy was surprised that no one had implemented this yet and we agreed that it was not rocket science by any means. In fact, I got a little time today to develop it and the result is FlashAid, which I've released under the open source MIT license on OSFlash!

FlashAid allows JavaScript to check if accessibility features exist on the user's computer by using a hidden (1 pixel x 1 pixel) Flash application. It requires Flash 8 and should be compatible with every browser supported by ExternalInterface (for a full list, see the FlashAid web page.)

Usage instructions

  1. Include the js/flashAid.js script
  2. Include the js/swfobject.js script (for embedding the Flash file)
  3. Create a
    with id="flashAid". If you want alternative content to display if Flash cannot be loaded, place it into this div.
  4. Inside your div, call the flashAid() method and pass in the name (string) of a method that will be called for success and one for failure. The method signature of the flashAid() method is:

    [js]flashAid ( successHandlerNameStr, failureHandlerNameStr, displayVersionMessageBool )[/js]

    Where displayVersionMessageBool is a boolean that determines whether or not a message will be displayed in the flashAid div if the user has the wrong version of the Flash Player. (FlashAid requires Flash Player 8 and above.)

  5. Code sample

    [js] [/js]

    Download FlashAid

    FlashAid v0.1 Preview is ready for download.

    This is a very early, proof-of-concept release. Please join the mailing list and give us feedback. It would be especially useful to hear from Ajax developers working on implementing accessibility in their applications.

    See the FlashAid web site for more information on FlashAid.

    Want to help spread the word? Digg this!