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
Modifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated.static final String
Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Deprecated.Requests the string value of the role with the specified namespace.static String
Deprecated.Requests the string value of the state with the specified namespace.static void
removeState
(Element elem, String stateName) Deprecated.Removes the state from the given element.static void
Deprecated.Assigns the specified element the specified role and value for that role.static void
Deprecated.Assigns the specified element the specified state and value for that state.
-
Field Details
-
ROLE_TREE
Deprecated.- See Also:
-
ROLE_TREEITEM
Deprecated.- See Also:
-
ROLE_BUTTON
Deprecated.- See Also:
-
ROLE_TABLIST
Deprecated.- See Also:
-
ROLE_TAB
Deprecated.- See Also:
-
ROLE_TABPANEL
Deprecated.- See Also:
-
ROLE_MENUBAR
Deprecated.- See Also:
-
ROLE_MENUITEM
Deprecated.- See Also:
-
STATE_ACTIVEDESCENDANT
Deprecated.- See Also:
-
STATE_POSINSET
Deprecated.- See Also:
-
STATE_SETSIZE
Deprecated.- See Also:
-
STATE_SELECTED
Deprecated.- See Also:
-
STATE_EXPANDED
Deprecated.- See Also:
-
STATE_LEVEL
Deprecated.- See Also:
-
STATE_HASPOPUP
Deprecated.- See Also:
-
STATE_PRESSED
Deprecated.- See Also:
-
-
Method Details
-
getRole
Deprecated.Requests the string value of the role with the specified namespace.- Parameters:
elem
- the element which has the specified role- Returns:
- the value of the role, or an empty string if none exists
-
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
Deprecated.Removes the state from the given element.- Parameters:
elem
- the element which has the specified statestateName
- the name of the state to remove
-
setRole
Deprecated.Assigns the specified element the specified role and value for that role.- Parameters:
elem
- the element to be given the specified roleroleName
- the name of the role
-
setState
Deprecated.Assigns the specified element the specified state and value for that state.- Parameters:
elem
- the element to be given the specified statestateName
- the name of the statestateValue
- the value of the state
-
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.