The goog.dom.a11y Namespace

The goog.dom.a11y.Announcer Class

Class that allows messages to be spoken by assistive technologies that the user may have active. … more

The goog.dom.a11y.LivePriority Enum

Enumeration of ARIA state values for live regions. See http://www.w3.org/TR/wai-aria/states_and_properties#aria-live for more information. … more

The goog.dom.a11y.Role Enum

Enumeration of ARIA roles. … more

The goog.dom.a11y.State Enum

Enumeration of ARIA states and properties. … more

.getActiveDescendant(element)

Gets the activedescendant of the given element.

element {Element}
DOM node to get activedescendant from.
returns {Element}
DOM node of the activedescendant.

.getRole(element)

Gets role of an element.

element {Element}
DOM node to get role of.
returns {string}
rolename.

.getState(element, stateName)

Gets value of specified state or property.

element {Element}
DOM node to get state from.
stateName {string}
State name.
returns {string}
Value of the state attribute.

.setActiveDescendant(element, activeElement)

Sets the activedescendant value for an element.

element {Element}
DOM node to set activedescendant to.
activeElement {Element}
DOM node being set as activedescendant.

.setRole(element, roleName)

Sets the role of an element.

element {Element}
DOM node to set role of.
roleName {string}
role name(s).

.setState(element, state, value)

Sets the state or property of an element.

element {Element}
DOM node where we set state.
state {string}
State attribute being set. Automatically adds prefix 'aria-' to the state name.
value {string|boolean|number}
Value for the state attribute.