Packagemx.accessibility
Classpublic class TabBarAccImpl
InheritanceTabBarAccImpl Inheritance AccImpl Inheritance AccessibilityImplementation

Review Needed

The TabBarAccImpl class, also called the TabBar or TabNavigatior Accessibility Implementation class, enables communication between a TabBar/TabNavigatior component and a screen reader. Screen readers are used to translate screen content into synthesized speech or braille for visually impaired users.

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

A TabBar or TabNavigatior reports the role ROLE_SYSTEM_PAGETABLIST (0x3C) to a screen reader. Each of the Tab items returns the role ROLE_SYSTEM_PAGETAB (0x25).

A TabBar reports the following states to a screen reader:

Additionally, Tab items report the following states:

A TabBar dispatches the following events to a screen reader:

See also

mx.containers.TabNavigator;
mx.controls.TabBar
mx.controls.tabBarClasses.Tab
mx.accessibility.AccImpl
Microsoft Accessibility Developer Center Object Roles


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.
TabBarAccImpl
 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 TabBarAccImpl instance for the specified TabBar component.
TabBarAccImpl
  
accDoDefaultAction(childID:uint):void
IAccessible method for performing the default action associated with a Tab, which is to select the Tab.
TabBarAccImpl
  
accLocation(childID:uint):*
IAccessible method for returning the bounding box of a Tab.
TabBarAccImpl
 Inherited
accSelect(selFlag:uint, childID:uint):void
IAccessible method for altering the selection in the component that this AccessibilityImplementation represents.
AccessibilityImplementation
  
[static] Method call for enabling accessibility for a component.
TabBarAccImpl
  
get_accDefaultAction(childID:uint):String
IAccessible method for returning the default action of a Tab, which is "Switch".
TabBarAccImpl
  
get_accFocus():uint
IAccessible method for returning the child focus of the TabBar.
TabBarAccImpl
 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.
TabBarAccImpl
 Inherited
IAccessible method for returning an array containing the IDs of all child elements that are selected.
AccessibilityImplementation
  
get_accState(childID:uint):uint
IAccessible method for returning the state of the Tabs.
TabBarAccImpl
 Inherited
get_accValue(childID:uint):String
IAccessible method for returning the runtime value of the component that this AccessibilityImplementation represents or of one of its child elements.
AccessibilityImplementation
  
Method to return an array containing the unsigned integer IDs of all Tabs in the TabBarAccImpl.
TabBarAccImpl
Protected Methods
 MethodDefined by
  
eventHandler(event:Event):void
Override the generic event handler.
TabBarAccImpl
  
getName(childID:uint):String
Method for returning the name of a TabBar's child Tab which is spoken out by the screen reader.
TabBarAccImpl
 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
TabBarAccImpl()constructor
public function TabBarAccImpl(master:UIComponent)

Creates a new TabBarAccImpl instance for the specified TabBar 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 TabBarAccImpl 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 Tab, which is to select the Tab.

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 Tab.

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

Returns
* — A child Tab.

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.TabBar component.
[AccessibilityClass(implementation="mx.accessibility.TabBarAccImpl")]

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 of a Tab, which is "Switch".

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 TabBar.

Returns
uint — A child id corresponding to the focusedIndex of the TabBar component instance.

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 TabBar component, ( childID == 0 ), reports the role ROLE_SYSTEM_PAGETABLIST (0x3c). Items of a ListBase component ( childID >= 1 ) report the role ROLE_SYSTEM_PAGETAB (0x25).

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_accState()method 
public override function get_accState(childID:uint):uint

IAccessible method for returning the state of the Tabs. States are predefined for all the components in MSAA. Values are assigned to each state. Depending upon the Tab being Selectable, Focusable, Focused, or Selected, 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 Tab being Selectable, Focusable, Focused, or Selected

See also

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

Method to return an array containing the unsigned integer IDs of all Tabs in the TabBarAccImpl.

Returns
Array — An array of unsigned integer IDs, one for each the TabBar's child Tabs.
getName()method 
protected override function getName(childID:uint):String

Method for returning the name of a TabBar's child Tab which is spoken out by the screen reader.

This method should return the label of the child Tab corresponding to the childID parameter. The string "Active" is appended for the active Tab.

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

Returns
String — Name string corresponding to the child Tab.