Packagemx.accessibility
Classpublic class ListBaseAccImpl
InheritanceListBaseAccImpl Inheritance AccImpl Inheritance AccessibilityImplementation
SubclassesDataGridAccImpl, ListAccImpl, MenuAccImpl

Review Needed

The ListBaseAccImpl class, also called the ListBase Accessiblity Implementation class, is used to make a ListBase component accessible.

Since List inherits from ListBase, this class is used in ListAccImpl as well.

The ListBaseAccImpl class supports system roles, object-based events, and states.

A ListBase reports the role ROLE_SYSTEM_LIST (0x21) to a screen reader. Items of a ListBase report the role ROLE_SYSTEM_LISTITEM (0x22).

A ListBase reports the following states to a screen reader:

Additionally, items of a ListBase report the following states:

A ListBase dispatches the following events to a screen reader:

See also

ListBase
Microsoft Accessibility Developer Center User Interface Element Reference: List Box


Public Properties
 PropertyDefined by
 Inheritederrno : uint
Errors are indicated out-of-band, rather than in return values.
AccessibilityImplementation
 Inheritedstub : Boolean
If a component is released without an ActionScript accessibility implementation, it is strongly suggested that a component accessibility stub be included.
AccessibilityImplementation
Protected Properties
 PropertyDefined by
  eventsToHandle : Array
[read-only] All AccImpl subclasses must override this function by returning an array of strings of the events for which the class should listen from its master component.
ListBaseAccImpl
 Inheritedmaster : UIComponent
A reference to the UIComponent instance that this AccImpl instance is making accessible.
AccImpl
 Inheritedrole : uint
Accessibility Role of the component being made accessible.
AccImpl
Public Methods
 MethodDefined by
  
Creates a new ListBaseAccImpl instance for the specified ListBase component.
ListBaseAccImpl
  
accDoDefaultAction(childID:uint):void
IAccessible method for performing the default action associated with a ListItem, which is Double Click.
ListBaseAccImpl
  
accLocation(childID:uint):*
IAccessible method for returning the bounding box of a ListItemRenderer.
ListBaseAccImpl
  
accSelect(selFlag:uint, childID:uint):void
IAccessible method for selecting an item.
ListBaseAccImpl
  
[static] Method call for enabling accessibility for a component.
ListBaseAccImpl
  
get_accDefaultAction(childID:uint):String
IAccessible method for returning the default action.
ListBaseAccImpl
  
get_accFocus():uint
IAccessible method for returning the child focus of the ListBase.
ListBaseAccImpl
 Inherited
get_accName(childID:uint):String
IAccessible method for returning the name for the component that this AccessibilityImplementation represents or for one of its child elements.
AccImpl
  
get_accRole(childID:uint):uint
IAccessible method for returning system role for the component.
ListBaseAccImpl
  
IAccessible method for returning an array of child ids which corresponds to the selectedIndices of the ListBase component instance.
ListBaseAccImpl
  
get_accState(childID:uint):uint
IAccessible method for returning the state of the ListItem.
ListBaseAccImpl
  
get_accValue(childID:uint):String
IAccessible method for returning the value of the ListItem/ListBox which is spoken out by the screen reader.
ListBaseAccImpl
  
Method to return an array of childIDs.
ListBaseAccImpl
Protected Methods
 MethodDefined by
  
eventHandler(event:Event):void
Override the generic event handler.
ListBaseAccImpl
  
getName(childID:uint):String
Method for returning the name of the ListItem/ListBox which is spoken out by the screen reader.
ListBaseAccImpl
 Inherited
getState(childID:uint):uint
Returns the state of the accessible component.
AccImpl
Property detail
eventsToHandleproperty
eventsToHandle:Array  [read-only]

All AccImpl subclasses must override this function by returning an array of strings of the events for which the class should listen from its master component.

Implementation
    protected function get eventsToHandle():Array
Constructor detail
ListBaseAccImpl()constructor
public function ListBaseAccImpl(master:UIComponent)

Creates a new ListBaseAccImpl instance for the specified ListBase component.

Direct calls to the AccImpl subclass constructors are unneccessary. When a Flex project is compiled with Generate accessible SWF file set to true, the compiler instantiates the accessibility implementations for the components used in the project that have them by calling the the static enableAccessibility() method.

Parameters
master:UIComponent — The UIComponent instance that this ListBaseAccImpl instance is making accessible.

See also

Method detail
accDoDefaultAction()method
public override function accDoDefaultAction(childID:uint):void

IAccessible method for performing the default action associated with a ListItem, which is Double Click.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

See also

accLocation()method 
public override function accLocation(childID:uint):*

IAccessible method for returning the bounding box of a ListItemRenderer.

Returns null if the childID property corresponds to an ListItemRenderer that is scrolled out of view.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
* — An IListItemRenderer.

See also

accSelect()method 
public override function accSelect(selFlag:uint, childID:uint):void

IAccessible method for selecting an item.

accSelect allows list items to be selected programmatically by a screen reader.

Parameters
selFlag:uint — A one or more selection flag constants to indicate how the item is selected or takes focus. While this parameter allows the assistive technology to specify multiselection of items, as a practical matter, the List components in Flex and Flash handle multi-selection by responding to keyboard and mouse events.
 
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

See also

enableAccessibility()method 
public static function enableAccessibility():void

Method call for enabling accessibility for a component. This method is required for the compiler to activate the accessibility classes for a component.

When a Flex project is compiled with the Generate accessible SWF file set to true, the Flex compiler automatically enables accessibility implementations for the components used in the project that have them.

Accessible component classes should include the [AccessibilityClass] meta tag to specify the appropriate AccImpl subclass or accessibility implementation and let the compiler know to call enableAccessibility().

See also


Example
Following is an example showing how the [AccessibilityClass] meta tag specifies the appropriate AccImpl subclass or accessibility implementation for the mx.controls.listClasses.ListBase component.
[AccessibilityClass(implementation="mx.accessibility.ListBaseAccImpl")]

eventHandler()method 
protected override function eventHandler(event:Event):void

Override the generic event handler. Each AccImpl subclass must implement this method to listen for events from its master component.

Parameters
event:Event — The event object.
get_accDefaultAction()method 
public override function get_accDefaultAction(childID:uint):String

IAccessible method for returning the default action. For child listItems, the default action is Double Click, but for the ListBase component itself, null is returned.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
String — DefaultAction String

See also

get_accFocus()method 
public override function get_accFocus():uint

IAccessible method for returning the child focus of the ListBase.

Returns
uint

See also

get_accRole()method 
public override function get_accRole(childID:uint):uint

IAccessible method for returning system role for the component. System roles are predefined for all the components in MSAA.

A ListBase component, ( childID == 0 ), reports the role ROLE_SYSTEM_LIST (0x2E). Items of a ListBase component ( childID >= 1 ) report the role ROLE_SYSTEM_LISTITEM (0x22).

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
uint — Role associated with the component.

See also

get_accSelection()method 
public override function get_accSelection():Array

IAccessible method for returning an array of child ids which corresponds to the selectedIndices of the ListBase component instance.

Returns
Array — An array of selected child ids.

See also

get_accState()method 
public override function get_accState(childID:uint):uint

IAccessible method for returning the state of the ListItem. States are predefined for all the components in MSAA. Values are assigned to each state. Depending upon the listItem being Selected, Selectable, Invisible, Offscreen, a value is returned.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
uint — State depending upon the listItem being Selected, Selectable, Invisible, Offscreen

See also

get_accValue()method 
public override function get_accValue(childID:uint):String

IAccessible method for returning the value of the ListItem/ListBox which is spoken out by the screen reader. The ListBase should return the name of the currently selected item with an "m of n" string as its value.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
String — Value String

See also

getChildIDArray()method 
public override function getChildIDArray():Array

Method to return an array of childIDs.

Returns
Array — An array of unsigned integer IDs, one for each listItem defined in the ListBase component's dataProvider.
getName()method 
protected override function getName(childID:uint):String

Method for returning the name of the ListItem/ListBox which is spoken out by the screen reader. The ListItem should return the label as the name with an "m of n" string and ListBox should return the name specified by the AccessibilityProperties.name.

Parameters
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().

Returns
String — Name of the ListItem or ListBox