Flash tabbing and focus solution (see below for source link)

The problem - see http://kb2.adobe.com/cps/155/tn_15586.html

A Flash movie embedded in an HTML page does not receive tabbing focus/key events when the page first loads in a web browser. In addition, in browsers other than Internet Explorer, it is impossible to pass the focus to the Flash player object without first clicking on the player. This is completely inaccessible to those who require mouse alternatives and for whom clicking is impossible.


In order for a Flash movie to capture key events, the movie itself must first be given focus from the browser. Web browsers do not automatically give keyboard focus to Flash movies, or any other embedded content.

The Solution

The code provided is a combination of AS3 and Javascript/JQuery. It will loop through all InteractiveObject and DisplayObjectContainer objects, checking to see if they have accessibility properties (tabIndex, accessibility name and description, etc). It will pass an array of these properties back to the page through ExternalInterface to JS functions, which will then build an "invisible" HTML form off the screen. Each element of that HTML form will represent an InteractiveObject in Flash, and can be tabbed and entered, passing the relevant "MouseEvent.CLICK" event back to the Flash player. in effect this allows the user to appear to be seamlessly tabbing through fully accessible Flash content, and interactiing with it, when in fact they are actually interacting with a HTML form, with javascript focus and click events being passed back to the Flash object.

[Source code]

Try it below: just hit the tab key to move through the buttons (shift+tab to reverse order) and hit ENTER or SPACE to simulate a mouse click on any element.