| Package | mx.accessibility |
| Class | public class AccImpl |
| Inheritance | AccImpl AccessibilityImplementation |
| Subclasses | AccordionHeaderAccImpl, ButtonAccImpl, ComboBaseAccImpl, DateChooserAccImpl, DateFieldAccImpl, ListBaseAccImpl, MenuBarAccImpl, PanelAccImpl, SliderAccImpl, TabBarAccImpl, TreeAccImpl |
AccImpl inherits from flash.accessibility.AccessibilityImplementation. Accessibility implementations for Flex components should inherit AccImpl.
AccImpl supports system roles, object based events, and states.
AccImpl reports the following state by default to a screen reader:
STATE_SYSTEM_NORMAL (0x00000000)STATE_SYSTEM_UNAVAILABLE (0x00000001)STATE_SYSTEM_FOCUSED (0x00000004)STATE_SYSTEM_FOCUSABLE (0x00100000)AccImpl dispatches the following event to a screen reader:
EVENT_OBJECT_NAMECHANGE (0x800C)See also
| Property | Defined 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.
| AccImpl | ||
| master : UIComponent
A reference to the UIComponent instance that this AccImpl instance
is making accessible.
| AccImpl | ||
| role : uint
Accessibility Role of the component being made accessible.
| AccImpl | ||
| Method | Defined by | ||
|---|---|---|---|
|
AccImpl(master:UIComponent)
Creates a new Accessibility Implementation instance for the specified component.
| AccImpl | ||
![]() |
accDoDefaultAction(childID:uint):void
IAccessible method that performs the default action associated with the component that this AccessibilityImplementation represents or of one of its child elements.
| AccessibilityImplementation | |
![]() |
accLocation(childID:uint):*
IAccessible method for returning a
DisplayObject or Rectangle specifying the bounding box of a child element in the AccessibilityImplementation. | AccessibilityImplementation | |
![]() |
accSelect(selFlag:uint, childID:uint):void
IAccessible method for altering the selection in the component that this AccessibilityImplementation represents.
| AccessibilityImplementation | |
|
enableAccessibility():void
[static]
Method call for enabling accessibility for a component.
| AccImpl | ||
![]() |
get_accDefaultAction(childID:uint):String
IAccessible method for returning the default action of the component that this AccessibilityImplementation represents or of one of its child elements.
| AccessibilityImplementation | |
![]() |
get_accFocus():uint
IAccessible method for returning the unsigned integer ID of the child element, if any,
that has child focus within the component.
| AccessibilityImplementation | |
|
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 the system role for the component that this AccessibilityImplementation represents or for one of its child elements.
| AccImpl | ||
![]() |
get_accSelection():Array
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 current runtime state of the component that this AccessibilityImplementation represents or of one of its child elements.
| AccessibilityImplementation | |
![]() |
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 | |
![]() |
getChildIDArray():Array
Returns an array containing the unsigned integer IDs of all child elements in the AccessibilityImplementation.
| AccessibilityImplementation | |
| Method | Defined by | ||
|---|---|---|---|
|
eventHandler(event:Event):void
Handles events from the master component.
| AccImpl | ||
|
getName(childID:uint):String
Returns the name of the accessible component or the name of one of its child elements.
| AccImpl | ||
|
getState(childID:uint):uint
Returns the state of the accessible component.
| AccImpl | ||
| eventsToHandle | property |
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
| master | property |
protected var master:UIComponentA reference to the UIComponent instance that this AccImpl instance is making accessible.
| role | property |
protected var role:uintAccessibility Role of the component being made accessible.
See also
| AccImpl | () | constructor |
public function AccImpl(master:UIComponent)Creates a new Accessibility Implementation instance for the specified component.
Direct calls to the AccImpl 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.
master:UIComponent — The UIComponent instance that this AccImpl instance is making accessible.
|
See also
| enableAccessibility | () | method |
public static function enableAccessibility():voidMethod 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
[AccessibilityClass] meta tag specifies the appropriate AccImpl subclass or
accessibility implementation for the mx.controls.Button component.
[AccessibilityClass(implementation="mx.accessibility.ButtonAccImpl")]
| eventHandler | () | method |
protected function eventHandler(event:Event):voidHandles events from the master component. All AccImpl subclasses must implement this method to listen for events from their master components.
Parametersevent:Event — The event object.
|
| get_accName | () | method |
public override function get_accName(childID:uint):StringIAccessible method for returning the name for the component that this AccessibilityImplementation represents or for one of its child elements.
In the case of the AccessibilityImplementation itself (childID == 0),
if this method is not implemented, or does not return a value, the Flash Player will
fall back to the AccessibilityProperties.name property, if it is present.
For AccessibilityImplementations that can have child elements, this method must be implemented, and must
return a string value when childID is nonzero.
Depending on the type of user interface element, names in MSAA mean one of two different things: an author-assigned name, or the actual text content of the element. Usually, an AccessibilityImplementation itself will fall into the former category—its name property is an author-assigned name. Child elements always fall into the second category—their names indicate their text content.
When the name property of an AccessibilityImplementation has the meaning of an author-assigned name,
there are two ways in which components can acquire names from authors. The
first entails names present within the component itself; for example, a checkbox
component might include a text label that serves as its name. The second—a fallback from the first—entails names specified in the UI, and ending
up in AccessibilityProperties.name. This fallback option allows users to specify
names just as they would for any other Sprite or MovieClip.
This leaves three possibilities for the AccessibilityImplementation itself (childID == zero):
Author-assigned name within component. The get_accName method
should be implemented and should return a string value that contains the
AccessibilityImplementation's name when childID is zero. If childID is zero but the
AccessibilityImplementation has no name, get_accName should return an empty string to prevent
the player from falling back to the AccessibilityProperties.name property.
Author-assigned name from UI. If the AccessibilityImplementation can have child
elements, the get_accName method should be implemented but should not return a value when
childID is zero. If the AccessibilityImplementation will never have child elements,
get_accName should not be implemented.
Name signifying content. The get_accName method should be
implemented and should return an appropriate string value when childID
is zero. If childId is zero but the AccessibilityImplementation has no content,
get_accName should return an empty string to prevent the player from falling back to
the AccessibilityProperties.name property.
Note that for child elements(if the AccessibilityImplementation can have them), the third case
always applies. The get_accName method should be implemented and should
return an appropriate string value when childID is nonzero.
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().
|
String — Name of the component or one of its child elements.
|
See also
| get_accRole | () | method |
public override function get_accRole(childID:uint):uintIAccessible method for returning the system role for the component that this AccessibilityImplementation represents or for one of its child elements. System roles are predefined for all the components in MSAA.
ParameterschildID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().
|
uint — System role associated with the component.
|
See also
| getName | () | method |
protected function getName(childID:uint):StringReturns the name of the accessible component or the name of one of its child elements.
All AccImpl subclasses must implement this method
instead of implementing get_accName.
childID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().
|
String — The name of the accessible component.
|
See also
| getState | () | method |
protected function getState(childID:uint):uintReturns the state of the accessible component.
ParameterschildID:uint — An unsigned integer corresponding to one of the component's child elements as defined by getChildIDArray().
|
uint — A combination of zero, one, or more of the system state constants. Multiple constants are assembled into a bitfield using |, the bitwise OR operator.
|
See also