Package com.google.gwt.user.client.ui
Class Accessibility
- java.lang.Object
-
- com.google.gwt.user.client.ui.Accessibility
-
@Deprecated public final class Accessibility extends java.lang.Object
Deprecated.Use the new GWT ARIA library with the factory class for the ARIA rolesRoles
. 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.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
Fields Modifier and Type Field Description static java.lang.String
ROLE_BUTTON
Deprecated.static java.lang.String
ROLE_MENUBAR
Deprecated.static java.lang.String
ROLE_MENUITEM
Deprecated.static java.lang.String
ROLE_TAB
Deprecated.static java.lang.String
ROLE_TABLIST
Deprecated.static java.lang.String
ROLE_TABPANEL
Deprecated.static java.lang.String
ROLE_TREE
Deprecated.static java.lang.String
ROLE_TREEITEM
Deprecated.static java.lang.String
STATE_ACTIVEDESCENDANT
Deprecated.static java.lang.String
STATE_EXPANDED
Deprecated.static java.lang.String
STATE_HASPOPUP
Deprecated.static java.lang.String
STATE_LEVEL
Deprecated.static java.lang.String
STATE_POSINSET
Deprecated.static java.lang.String
STATE_PRESSED
Deprecated.static java.lang.String
STATE_SELECTED
Deprecated.static java.lang.String
STATE_SETSIZE
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
getRole(Element elem)
Deprecated.Requests the string value of the role with the specified namespace.static java.lang.String
getState(Element elem, java.lang.String stateName)
Deprecated.Requests the string value of the state with the specified namespace.static void
removeState(Element elem, java.lang.String stateName)
Deprecated.Removes the state from the given element.static void
setRole(Element elem, java.lang.String roleName)
Deprecated.Assigns the specified element the specified role and value for that role.static void
setState(Element elem, java.lang.String stateName, java.lang.String stateValue)
Deprecated.Assigns the specified element the specified state and value for that state.
-
-
-
Field Detail
-
ROLE_TREE
public static final java.lang.String ROLE_TREE
Deprecated.- See Also:
- Constant Field Values
-
ROLE_TREEITEM
public static final java.lang.String ROLE_TREEITEM
Deprecated.- See Also:
- Constant Field Values
-
ROLE_BUTTON
public static final java.lang.String ROLE_BUTTON
Deprecated.- See Also:
- Constant Field Values
-
ROLE_TABLIST
public static final java.lang.String ROLE_TABLIST
Deprecated.- See Also:
- Constant Field Values
-
ROLE_TAB
public static final java.lang.String ROLE_TAB
Deprecated.- See Also:
- Constant Field Values
-
ROLE_TABPANEL
public static final java.lang.String ROLE_TABPANEL
Deprecated.- See Also:
- Constant Field Values
-
ROLE_MENUBAR
public static final java.lang.String ROLE_MENUBAR
Deprecated.- See Also:
- Constant Field Values
-
ROLE_MENUITEM
public static final java.lang.String ROLE_MENUITEM
Deprecated.- See Also:
- Constant Field Values
-
STATE_ACTIVEDESCENDANT
public static final java.lang.String STATE_ACTIVEDESCENDANT
Deprecated.- See Also:
- Constant Field Values
-
STATE_POSINSET
public static final java.lang.String STATE_POSINSET
Deprecated.- See Also:
- Constant Field Values
-
STATE_SETSIZE
public static final java.lang.String STATE_SETSIZE
Deprecated.- See Also:
- Constant Field Values
-
STATE_SELECTED
public static final java.lang.String STATE_SELECTED
Deprecated.- See Also:
- Constant Field Values
-
STATE_EXPANDED
public static final java.lang.String STATE_EXPANDED
Deprecated.- See Also:
- Constant Field Values
-
STATE_LEVEL
public static final java.lang.String STATE_LEVEL
Deprecated.- See Also:
- Constant Field Values
-
STATE_HASPOPUP
public static final java.lang.String STATE_HASPOPUP
Deprecated.- See Also:
- Constant Field Values
-
STATE_PRESSED
public static final java.lang.String STATE_PRESSED
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getRole
public static java.lang.String getRole(Element elem)
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
public static java.lang.String getState(Element elem, java.lang.String stateName)
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
public static void removeState(Element elem, java.lang.String stateName)
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
public static void setRole(Element elem, java.lang.String roleName)
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
public static void setState(Element elem, java.lang.String stateName, java.lang.String stateValue)
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
-
-