Package com.google.gwt.user.client.ui
Class Accessibility
java.lang.Object
com.google.gwt.user.client.ui.Accessibility
Deprecated.
Allows ARIA attributes to be added to widgets so that they can be identified by assistive technologies.
A 'role' describes the role a widget plays in a page: i.e. a checkbox widget is assigned a "checkbox" role.
A 'state' describes the current state of the widget. For example, a checkbox widget has the state "checked", which is given a value of "true" or "false" depending on whether it is currently checked or unchecked.
See the MDC page on Accessible DHTML for more information.
Note that although this API is public, the ARIA specification is still somewhat in flux. As a result, this API is subject to change as the specification stabilizes; we will do our best to keep the community updated on changes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated.static final StringDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDeprecated.Requests the string value of the role with the specified namespace.static StringDeprecated.Requests the string value of the state with the specified namespace.static voidremoveState(Element elem, String stateName) Deprecated.Removes the state from the given element.static voidDeprecated.Assigns the specified element the specified role and value for that role.static voidDeprecated.Assigns the specified element the specified state and value for that state.
-
Field Details
-
ROLE_TREE
-
ROLE_TREEITEM
-
ROLE_BUTTON
-
ROLE_TABLIST
-
ROLE_TAB
-
ROLE_TABPANEL
-
ROLE_MENUBAR
-
ROLE_MENUITEM
-
STATE_ACTIVEDESCENDANT
-
STATE_POSINSET
-
STATE_SETSIZE
-
STATE_SELECTED
-
STATE_EXPANDED
-
STATE_LEVEL
-
STATE_HASPOPUP
-
STATE_PRESSED
-
-
Method Details
-
getRole
-
getState
Deprecated.Requests the string value of the state with the specified namespace.- Parameters:
elem- the element which has the specified statestateName- the name of the state- Returns:
- the value of the state, or an empty string if none exists
-
removeState
-
setRole
-
setState
-
Roles. There are getters for all ARIA roles. For each role there are get/set/remove methods defined for all (own and inherited) supported states and properties.