WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: AccessibilityProperties in Flex

for

From: Andrew Kirkpatrick
Date: Apr 27, 2007 11:10AM


Forgot one thing. In my message below I write a function, but didn't
show how it is called. In the case where you want the name set when the
app is loaded, you can use creationComplete in the mx:Application
element, as shown in the complete application source below.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
layout="absolute" width="100%" height="100%" creationComplete="init()">
<mx:Script>
<![CDATA[
public function init():void{
myComboBox.accessibilityProperties = new
AccessibilityProperties();
myComboBox.accessibilityProperties.name = "I am read
from Accessibility Properties name";
myComboBox.accessibilityProperties.description = "I am
read from Accessibility Properties description";
Accessibility.updateProperties();
}

[Bindable]
public var cards: Array = [ {label:"Visa", data:1}, {label:"Master
Card", data:2}, {label:"American Express", data:3} ];

]]>
</mx:Script>
<mx:VBox>
<mx:Label text="This file has a regular checkbox, a
disabled checkbox, and a checkbox with a text label and a toolTip"/>
<mx:TextInput/>
<mx:ComboBox dataProvider="{cards}" id="myComboBox"/>
<mx:CheckBox label="Beef" enabled="false"/>
<mx:CheckBox label="Vegetarian" toolTip="May include
seafood"/>
</mx:VBox>
</mx:Application>

>