Packagemx.accessibility
Classpublic class SliderAccImpl
InheritanceSliderAccImpl Inheritance AccImpl Inheritance AccessibilityImplementation

Review Needed

The SliderAccImpl class, also called the Slider Accessibility Implementation class, enables communication between an HSlider or VSlider component and a screen reader. Screen readers are used to translate screen content into synthesized speech or braille for visually impaired users.

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

An HSlider or VSlider reports the role ROLE_SLIDER (0x33) to a screen reader.

An HSlider or VSlider reports the following states to a screen reader:

An HSlider or VSlider dispatches the following events to a screen reader:

See also

mx.controls.Slider
mx.accessibility.AccImpl
Microsoft Accessibility Developer Center User Interface Element Reference: Slider Control


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.
SliderAccImpl
 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 SliderAccImpl instance for the specified Slider component.
SliderAccImpl
 Inherited
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
 Inherited
accLocation(childID:uint):*
IAccessible method for returning a DisplayObject or Rectangle specifying the bounding box of a child element in the AccessibilityImplementation.
AccessibilityImplementation
 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.
SliderAccImpl
 Inherited
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
 Inherited
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
 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.
SliderAccImpl
 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 Slider.
SliderAccImpl
  
get_accValue(childID:uint):String
IAccessible method for returning the value of the Slider, which should be the value of the current Slider thumb as a percentage of the difference between the maximum and minimum values.
SliderAccImpl
  
Method to return an array containing the unsigned integer IDs of all the thumbs in the Slider control.
SliderAccImpl
Protected Methods
 MethodDefined by
  
eventHandler(event:Event):void
Override the generic event handler.
SliderAccImpl
  
getName(childID:uint):String
Method for returning the name of the Slider which is spoken out by the screen reader.
SliderAccImpl
  
getState(childID:uint):uint
Utility method determines state of the accessible component.
SliderAccImpl
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
SliderAccImpl()constructor
public function SliderAccImpl(master:UIComponent)

Creates a new SliderAccImpl instance for the specified Slider 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 SliderAccImpl instance is making accessible.

See also

Method detail
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.Slider component.
[AccessibilityClass(implementation="mx.accessibility.SliderAccImpl")]

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_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 Slider component, ( childID == 0 ), reports the role ROLE_SLIDER (0x33).

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 Slider. States are predefined for all the components in MSAA. Values are assigned to each state. Depending upon the Slider being Selectable, Selected and Focused, 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 Slider being Selectable, Selected and Focused

See also

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

IAccessible method for returning the value of the Slider, which should be the value of the current Slider thumb as a percentage of the difference between the maximum and minimum values.

Note that, at present, screen readers have difficulty interpreting sliders with multiple thumbs and tend to only speak the value of the first thumb. This is in part because the MSAA specification only provides an accessibility object model for a slider control with a single thumb. It is recommended that you avoid using sliders with multiple thumbs in applications where screen reader accessibility is a requirement.

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 containing the unsigned integer IDs of all the thumbs in the Slider control.

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

Method for returning the name of the Slider which is spoken out by the screen reader.

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 Slider control.
getState()method 
protected override function getState(childID:uint):uint

Utility method determines state of the accessible component.

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 Slider or Slider thumb being enabled, Focusable, and Focused