a11y.aria.Announcer Extends goog.Disposable
Class that allows messages to be spoken by assistive technologies that the user may have active.

Inheritance

Constructor

goog.a11y.aria.Announcer(opt_domHelper)

Parameters

opt_domHelper : goog.dom.DomHelper=
DOM helper.

Instance Methods

Public Protected Private
disposeInternal()
No description.
code »
getLiveRegion_(priority) !Element
Returns an aria-live region that can be used to communicate announcements.
Arguments:
priority : !goog.a11y.aria.LivePriority
The required priority.
Returns: !Element  A live region of the requested priority.
code »
say(messageopt_priority)
Announce a message to be read by any assistive technologies the user may have active.
Arguments:
message : string
The message to announce to screen readers.
opt_priority : goog.a11y.aria.LivePriority=
The priority of the message. Defaults to POLITE.
code »
addOnDisposeCallback(callbackopt_scope)
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
Arguments:
callback : function(this:T):?
The callback function.
opt_scope : T=
An optional scope to call the callback in.
code »
dispose() void
Disposes of the object. If the object hasn't already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend goog.Disposable should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' disposeInternal method. Everywhere else the public dispose method must be used. For example:
  mypackage.MyClass = function() {
    mypackage.MyClass.base(this, 'constructor');
    // Constructor logic specific to MyClass.
    ...
  };
  goog.inherits(mypackage.MyClass, goog.Disposable);

  mypackage.MyClass.prototype.disposeInternal = function() {
    // Dispose logic specific to MyClass.
    ...
    // Call superclass's disposeInternal at the end of the subclass's, like
    // in C++, to avoid hard-to-catch issues.
    mypackage.MyClass.base(this, 'disposeInternal');
  };
code »
getDisposed() boolean
Use #isDisposed instead. No description.
Returns: boolean  Whether the object has been disposed of.
code »
isDisposed() boolean
No description.
Returns: boolean  Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable : goog.disposable.IDisposable
that will be disposed when this object is disposed.
code »

Instance Properties

constructor :
No description.
Code »
domHelper_ : goog.dom.DomHelper
No description.
Code »
liveRegions_ :
Map of priority to live region elements to use for communicating updates. Elements are created on demand.
Code »
creationStack :
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
Code »
disposed_ :
Whether the object has been disposed of.
Code »
onDisposeCallbacks_ :
Callbacks to invoke when this object is disposed.
Code »

Static Properties

goog.a11y.aria.Announcer.superClass_ :
No description.
Code »

Package a11y.aria

Package Reference