Table of Contents

Accessibility.sendEvent( ) Method Flash 6 (ActiveX for Windows IE only)

send an event notice to MSAA
Accessibility.sendEvent(movieClip, childID, event, isNonHtml)

Arguments

movieClip

The movie clip instance sending the event.

childID

The child interface element to which the event applies (for example, an individual list item in a list box). Use 0 to indicate that the event applies to the specified movieClip.

event

A constant indicating the type of event. The event names and values used are a subset of the MSAA event constants listed in Microsoft's MSAA documentation at http://msdn.microsoft.com/at.

isNonHtml

A Boolean indicating whether the event is (false) or is not (true) one of the standard event types that can be generated by an HTML form. When set to true, this argument prevents problems in some screen readers that interpret Flash content in Internet Explorer as part of the HTML page. Defaults to false.

Description

The sendEvent( ) method is used by accessible UI components to notify Microsoft Active Accessibility (MSAA) of an interface change in the component. MSAA passes the message on to a screen reader application that reports the change to the user. For example, a radio button movie clip would use sendEvent( ) to notify MSAA when its name changes or when it is selected or unselected. If movieClip is not a movie clip instance, or if childID or event are missing, sendEvent( ) fails silently. If no accessibility aids are running, calling sendEvent( ) has no effect.

The sendEvent( ) method is only one part of the MASCA API that, at the time of this writing, is not yet publicly documented, but it is an important part of the company's Flash component strategy. The API requires components to define special objects and constants in order to communicate with MSAA. For example, each component that wishes to be accessible must store an object in the reserved _accImpl property. This object, known as the ActionScript Accessibility Object (ASAO), implements methods and properties that describe the component in accessibility terms and expose it to MSAA (much like the C++ IAccessible interface, for which an ASAO is, in fact, a simplified wrapper).

Once the required objects and constants have been defined according to the MASCA API, a component depicts interface interaction in accessible terms via sendEvent( ). For example, the setLabel( ) method of the radio button component uses sendEvent( ) to notify a screen reader when the button's label changes:

FRadioButtonClass.prototype.setLabel = function(label)
{
  this.fLabel_mc.setLabel( label );
  this.txtFormat();
  // ACCESSIBILITY
  if(Accessibility.isActive()){
    Accessibility.sendEvent( this, 0, this.EVENT_OBJECT_NAMECHANGE );
  }
}

For more information on the IAccessible interface, see:

http://msdn.microsoft.com/library/en-us/msaa/msaapndx_6qlh.asp

For more information on MSAA, see:

http://msdn.microsoft.com/library/en-us/msaa/msaastart_9w2t.asp

Microsoft regularly changes links on its developer web site. If these documents are no longer available, consult http://msdn.microsoft.com/at.

See Also

capabilities.hasAccessibility


Table of Contents