This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionScript: | |
import flash.external.*; | |
public class MyButton extends Sprite() | |
{ | |
//Override the visible property to inform the screen reader when this object becomes visible | |
override public function set visible(value : Boolean) : void | |
{ | |
super.visible = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Accessibility.active) | |
{ | |
Accessibility.updateProperties(); | |
} | |
Note that the Accessibility.active value is set to true when any type | |
of assistive technology is connected and shouldn’t be relied upon to | |
determine if a screen reader is actually running. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myDisplayObject : Sprite = new Sprite(); | |
//Inform the screen reader that the Sprite will serve as a button | |
myDisplayObject.buttonMode = true; | |
var accessibilityProperities = new AccessibilityProperties(); | |
//The descriptive name to be read aloud by the screen reader or rendered in braille | |
accessibilityProperities.name = “My button”; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JavaScript code | |
//Create a HTML anchor point beforeFlash | |
var beforeFlash = $('<div id="beforeFlash"><a href="http://www.bbc.co.uk">Link 1</a></div>'); | |
//Add focus listener to beforeFlash to manually override tab controls when using tabs through page | |
beforeFlash.keydown(function (event) { | |
//Override tab controls to manually pass focus to Flash | |
var keyCode = event.keyCode || event.which; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Basic tab controls on a Flash Sprite | |
var myDisplayObject : Sprite = new Sprite(); | |
myDisplayObject.tabEnabled = true; | |
myDisplayObject.tabIndex = 0; | |
myDisplayObject.buttonMode = true; |