B2G/gecko/accessible/src/jsat/UtteranceGenerator.jsm
/**
   * Generates an utterance for an object.
   * @param {nsIAccessible} aAccessible accessible object to generate utterance
   *    for.
   * @return {Array} Two string array. The first string describes the object
   *    and its states. The second string is the object's name. Whether the
   *    object's description or it's role is included is determined by
   *    {@link verbosityRoleMap}.
   */
Generates an utterance for an object.
@param {nsIAccessible} aAccessible accessible object to generate utterance
for.
@return {Array} Two string array. The first string describes the object
and its states. The second string is the object's name. Whether the
object's description or it's role is included is determined by
verbosityRoleMap.
Generates an utterance for an object . @param { nsIAccessible } aAccessible accessible object to generate utterance for . @return { Array } Two string array . The first string describes the object and its states . The second string is the object ' s name . Whether the object ' s description or it ' s role is included is determined by verbosityRoleMap .
function genForObject(aAccessible) {
    let roleString = Utils.AccRetrieval.getStringRole(aAccessible.role);
    let func = this.objectUtteranceFunctions[roleString] ||
      this.objectUtteranceFunctions.defaultFunc;
    let flags = this.verbosityRoleMap[roleString] || 0;
    if (aAccessible.childCount == 0)
      flags |= INCLUDE_NAME;
    let state = {};
    let extState = {};
    aAccessible.getState(state, extState);
    let states = {base: state.value, ext: extState.value};
    return func.apply(this, [aAccessible, roleString, states, flags]);
  }
function genForObject ( aAccessible ) { let roleString = Utils . AccRetrieval . getStringRole ( aAccessible . role ) ; let func = this . objectUtteranceFunctions [ roleString ] || this . objectUtteranceFunctions . defaultFunc ; let flags = this . verbosityRoleMap [ roleString ] || 0 ; if ( aAccessible . childCount == 0 ) flags |= INCLUDE_NAME ; let state = { } ; let extState = { } ; aAccessible . getState ( state , extState ) ; let states = { base : state . value , ext : extState . value } ; return func . apply ( this , [ aAccessible , roleString , states , flags ] ) ; }
Generates an utterance for an object.
Generates an utterance for an object .