// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved. package fl.accessibility { import fl.controls.RadioButton; import fl.core.UIComponent; /** * The student_ar_fl_accessibility_RadioButtonAccImpl class, also called the RadioButton Accessibility Implementation class, * is used to make a RadioButton component accessible. This class enables communication * between a RadioButton component and a screen reader. Screen readers are used to translate * screen content into synthesized speech or braille for visually impaired users. * *
The student_ar_fl_accessibility_RadioButtonAccImpl class supports system roles, object-based events, and states.
* *A RadioButton reports the role ROLE_SYSTEM_RADIOBUTTON
(0x2D) to a screen
* reader.
A RadioButton reports the following states to a screen reader:
*STATE_SYSTEM_NORMAL
(0x00000000)STATE_SYSTEM_UNAVAILABLE
(0x00000001)STATE_SYSTEM_FOCUSED
(0x00000004)STATE_SYSTEM_PRESSED
(0x00000008)STATE_SYSTEM_CHECKED
(0x00000010)STATE_SYSTEM_FOCUSABLE
(0x00100000)A RadioButton dispatches the following events to a screen reader:
*EVENT_OBJECT_STATECHANGE
(0x800A)EVENT_OBJECT_NAMECHANGE
(0x800C)hookAccessibility()
method.
* This is used for initializing CheckBoxAccImpl class to hook its
* createAccessibilityImplementation()
method to CheckBox class
* before it gets called from UIComponent.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
private static var accessibilityHooked:Boolean = hookAccessibility();
/**
* @private
* Static method for swapping the createAccessibilityImplementation()
* method of CheckBox with the CheckBoxAccImpl class.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
private static function hookAccessibility():Boolean {
RadioButton.createAccessibilityImplementation = createAccessibilityImplementation;
return true;
}
//--------------------------------------------------------------------------
// Class methods
//--------------------------------------------------------------------------
/**
* @private
* Method for creating the Accessibility class.
* This method is called from UIComponent.
*
* @param component The UIComponent instance that this AccImpl instance
* is making accessible.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static function createAccessibilityImplementation(component:UIComponent):void {
component.accessibilityImplementation = new student_ar_fl_accessibility_RadioButtonAccImpl(component);
}
/**
* Enables accessibility for a RadioButton component.
* This method is required for the compiler to activate
* the accessibility classes for a component.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public static function enableAccessibility():void {
}
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
* @private
* @internal Nivesh says: I don't think we should document the constructors
* for the accessibility classes. End-users just have to call the
* static enableAccessibility method. They don't really create an
* instance of the classes.
*
* Creates a student_ar_fl_accessibility_RadioButtonAccImpl instance for the specified RadioButton component.
*
* @param master The RadioButton instance that this AccImpl instance
* makes accessible.
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
public function student_ar_fl_accessibility_RadioButtonAccImpl(master:UIComponent) {
super(master);
role = 0x2D;
}
}
}