Editorial Note: These files seem to be different from what was expected in the wiki. The files I was expecting were named client_side_validation_flash_forms_using_accessible_description_as2.*, while what we have are client_side_validation_flash_forms_using_alert_as2.*. And reading over the example in the wiki and looking at the example files, it seems they don't match. The example files use an alert, but the wiki describes updating the accessible name. The example seems good, but like it applies to a different technique, which maybe we should document. Either that, we should update the technique, particularly the example it claims to be a working example of, or get the correct example files in place.
Adobe Flash Builder 4.5
In this example, a group of buttons is assigned the same event handlers for the flash.events.FocusEvent.FOCUS_IN and flash.events.MouseEvent.MOUSE_OVER events. When a button receives focus or is hovered over using a mouse, text describing the button will be updated.
In ActionScript 3 the accessible name needs to be set on a component's accessibilityProperties property. This property must be an an instance of flash.accessibility.AccessibilityProperties. If the property has not been set yet, the developer needs to create the a new AccessibilityProperties instance and assign it to the accessibilityProperties property. The object itself can have several accessibility related properties, one of them being accessibilityProperties.name which specifies the accessible name. When an accessibilityProperties property is updated, the developer must call flash.accessibility.Accessibility.UpdateProperties() for the changes to take effect. Before calling Accessibility.UpdateProperties(), it is recommended to check the flash.system.capabilities.hasAccessibility flag. this will prevent an error on environments that do not support MSAA.
Ensure that the textual descriptions for each form control within the flash application is placed adjacent to the control itself. Text eligible to be used for auto-labeling must not be set to be hidden from assistive technology.
In this example, a Flash object is loaded into an HTML document using SWFObject's dynamic publishing method. The Flash object's container element is given a class name of "flashPlaceHolder". This class name is then targeted using CSS to set its width and height using relative em values. When the user increases or decreases the browser's text size, the Flash object will scale accordingly. To ensure that the object does not become too small when text size is decreased, the min-width and min-height properties are set to the default dimensions.
To perform screen reader detection, Flash provides the flash.accessibility.Accessibility.active property. If this property is set to true, it means that the Flash player has detected running assistive technology. Based on this flag, the Flash developer can choose to run different functionality.
A class called SoundHandler is created which automatically starts playing an mp3 file only when Accessibility.active is set to false. Note that this example also checks the flash.system.Capabilities.hasAccessibility property. This property does not check whether a screen reader is running, but instead indicates whether the Flash player is running in an environment that supports MSAA (which basically means the Windows operating system). 2ff7e9595c
Comentarios