Accessibility for Spark Components - Functional and Design SpecificationGlossaryaccessibility - The practice of making software usable by all people regardless of their abilities or disabilities. For Flex applications, a primary concern is whether they can be used by visually impaired users. MSAA - Microsoft Active Accessibility, a specification by which MSAA client applications such as JAWS, a screen reader, communicate with MSAA server applications such as Flash Player. IAccessible - A COM interface defined by MSAA so that MSAA clients can talk to MSAA servers. ISimpleTextSelection - Another COM interface defined by Adobe to supplement IAccessible by providing information about text selection in components with editable text, since MSAA does not include this information. accessibility implementation class - A subclass of flash.accessibility.AccessibilityImplementation which provides default MSAA behavior for a component. accessibility properties - Information set into the flash.accessibility.AccessibilityProperties instance associated with a component, which customizes the default behavior of the accessibility implementation class for a particular component instance. Summary and BackgroundMost of the MX components had long had corresponding accessibility implementation classes. In Flex 4 we will provide accessibility implementaton classes for the new Spark components. We will make it easier to write such classes by documenting the new Spark accessibility implementation classes in detail, and by providing and documenting the MSAA constants used in such classes. We will make it easier to set the accessibility properties for a component by adding accessibilityName and accessibilityDescription properties to UIComponent. Finally, we will turn on accessibility by default, so that unless a Flex application is compiled with -accessible=false it will automatically provide MSAA information to screen readers, when executing on Flash runtimes supporting MSAA. Usage ScenariosSame as for MX components. Detailed DescriptionNew accessibility implementation classesThe following Spark components will be made accessible by writing a corresponding accessibility implementation class (e.g., spark.accessibility.ButtonAccImpl to go with spark.components.Button). The MSAA behavior provided by these classes is described in each link below. The Spark accessibility implementation classes, like the MX ones, will extend the existing mx.accessibility.AccImpl class, which itself extends flash.accessibility.AccessibilityImplementation. A description of AccImpl is here: The Spark accessibility implementation classes will live in spark.swc in the spark.accessibility package. MSAA constantsStatesprivate static const STATE_SYSTEM_NORMAL:uint = 0x0; RolesPredefined role constants (possible values of o.accRole(childId)) Eventsprivate static const EVENT_MIN:uint = 0x00000001; TBD New accessors on UIComponent for accessibility propertiesTo make it easier to set per-instance accessibility properties in MXML, we will add four new convenience getter/setters to UIComponent:
The getters will simply return the relevant property of the UIComponent's accessibilityProperties object, or the default value if accessibilityProperties is null. The setters will create the accessibilityProperties object if it does not yet exist, and then set the relevant property. We will not expose convenience accessors for forceSimple or noAutoLabeling because Flex applications should not set these. Flash Player only supports a two-level hierarchy of IAccessible objects, and setting forceSimple to true in order to ignore the grandchildren doesn't seem useful. The Flash Player's auto-labeling algorithm is inappropriate for Flex apps, especially when we support "mirrored" layout for right-to-left locales. Accessibility enabled by defaultThe mxmlc compiler will default to using the option -accessible=true. This results in the required accessibility implementation classes being linked in and initialized, so that each UIComponent's accessibilityImplementation is non-null. How the MSAA AccName is constructed for form fieldsThe AccImpl name for a control is only part of the ultimate name of that control if the control is in a form. The full MSAA name of such a control consists of the following parts, in this order, with a space between parts: *The form's name. API DescriptionNew accessibility implementation classesThe new accessibility implementation classes live in the spark.accessibility package. Each one extends either mx.accessibility.AccImpl or another Spark acc impl:
They do not introduce any new properties or methods. The ASDoc for each new class will be the description in the component links above. MSAA constantsTBD New accessors on UIComponent for accessibility propertiesThe following getter/setters will be added to UIComponent: /** * A convenience accessor for the 'silent' property * in this UIComponent's accessibilityProperties object. * * Note that accessibilityEnabled has the opposite sense from silent; * accessibilityEnabled is true when silent is false and vice versa. * * The getter simply returns accessibilityProperties.silent, * or true if accessibilityProperties is null. * The setter first checks whether accessibilityProperties is null, and if it is, * sets it to a new AccessibilityProperties instance; * then it sets accessibilityProperties.silent. */ public function get accessibilityEnabled():Boolean public function set accessibilityEnabled(value:Boolean):void /** * A convenience accessor for the 'name' property * in this UIComponent's accessibilityProperties object. * * The getter simply returns accessibilityProperties.name, * or "" if accessibilityProperties is null. * The setter first checks whether accessibilityProperties is null, and if it is, * sets it to a new AccessibilityProperties instance; * then it sets accessibilityProperties.name. */ public function get accessibilityName():String public function set accessibilityName(value:String):void /** * A convenience accessor for the 'description' property * in this UIComponent's accessibilityProperties object. * * The getter simply returns accessibilityProperties.description, * or "" if accessibilityProperties is null. * The setter first checks whether accessibilityProperties is null, and if it is, * sets it to a new AccessibilityProperties instance; * then it sets accessibilityProperties.description. */ public function get accessibilityDescription():String public function set accessibilityDescription(value:String):void /** * A convenience accessor for the 'shortcut' property * in this UIComponent's accessibilityProperties object. * * The getter simply returns accessibilityProperties.shortcut, * or "" if accessibilityProperties is null. * The setter first checks whether accessibilityProperties is null, and if it is, * sets it to a new AccessibilityProperties instance; * then it sets accessibilityProperties.shortcut. */ public function get accessibilityShortcut():String public function set accessibilityShortcut(value:String):void B FeaturesNone. Examples and UsageTBD Additional Implementation DetailsTBD Prototype WorkNone. Compiler WorkNone. Web Tier Compiler ImpactNone. Flex Feature DependenciesNone. Backwards CompatibilitySyntax changesNone. BehaviorNone. Warnings/DeprecationNone. AccessibilityThat's what this feature is all about! PerformanceNo performance issue. GlobalizationNone. LocalizationCompiler FeaturesNone. Framework FeaturesTBD. Issues and RecommendationsOpen IssuesNone. Resolved IssuesNone. DocumentationTBD QATBD |
|
| You must be logged in to comment. |
|---|
Regarding getName:
I ran some tests and found that what getName returns is often prepended/appended to the AccessibilityProperties.name string for the object. If you noticed the function is getName and NOT get_accName like the others. I think a get_accName is generated at some point with a combination of these strings.
There are two things that all should be aware of when creating/updating the accImpls
1. The names of the some of the Flex based events that we monitor in the AccImpls may have changed. All events should be double checked and tested with Event32.exe to ensure they are still firing for assistive technology.
2. There are many Flex bugs in bugs.adobe.com that relate to the components – bug fixes should be applied to the relevant components when possible. Please review the Jira site to find out what bugs are related to your AccImpl.

Is anyone updating the AccImpl for DateField? When the halo component is editable there is no focus change event that is fired when tabbing to the control.