GWT 2.5.0.rc1

com.google.gwt.aria.client
Class Role

java.lang.Object
  extended by com.google.gwt.aria.client.Role
Direct Known Subclasses:
AlertdialogRoleImpl, AlertRoleImpl, ApplicationRoleImpl, ArticleRoleImpl, BannerRoleImpl, ButtonRoleImpl, CheckboxRoleImpl, ColumnheaderRoleImpl, ComboboxRoleImpl, ComplementaryRoleImpl, ContentinfoRoleImpl, DefinitionRoleImpl, DialogRoleImpl, DirectoryRoleImpl, DocumentRoleImpl, FormRoleImpl, GridcellRoleImpl, GridRoleImpl, GroupRoleImpl, HeadingRoleImpl, ImgRoleImpl, LinkRoleImpl, ListboxRoleImpl, ListitemRoleImpl, ListRoleImpl, LogRoleImpl, MainRoleImpl, MarqueeRoleImpl, MathRoleImpl, MenubarRoleImpl, MenuitemcheckboxRoleImpl, MenuitemradioRoleImpl, MenuitemRoleImpl, MenuRoleImpl, NavigationRoleImpl, NoteRoleImpl, OptionRoleImpl, PresentationRoleImpl, ProgressbarRoleImpl, RadiogroupRoleImpl, RadioRoleImpl, RegionRoleImpl, RowgroupRoleImpl, RowheaderRoleImpl, RowRoleImpl, ScrollbarRoleImpl, SearchRoleImpl, SeparatorRoleImpl, SliderRoleImpl, SpinbuttonRoleImpl, StatusRoleImpl, TablistRoleImpl, TabpanelRoleImpl, TabRoleImpl, TextboxRoleImpl, TimerRoleImpl, ToolbarRoleImpl, TooltipRoleImpl, TreegridRoleImpl, TreeitemRoleImpl, TreeRoleImpl

public class Role
extends java.lang.Object

Allows ARIA Accessibility attributes to be added to widgets so that they can be identified by assistive technology.

ARIA roles define widgets and page structure that can be interpreted by a reader application/device. There is a set of abstract roles which are used as building blocks of the roles hierarchy structural and define the common properties and states for the concrete roles. Abstract roles cannot be set to HTML elements.

This class defines some of the supported operations for a role -- set/get/remove role to/from a DOM element.

For more details about ARIA roles check The Roles Model .


Field Summary
static java.lang.String ATTR_NAME_ROLE
           
 
Constructor Summary
Role(java.lang.String roleName)
           
 
Method Summary
 java.lang.String get(Element element)
          Gets the role for the element element.
 java.lang.String getName()
          Gets the role name
 void remove(Element element)
          Removes the role for element element
 void set(Element element)
          Sets the role to element element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_NAME_ROLE

public static final java.lang.String ATTR_NAME_ROLE
See Also:
Constant Field Values
Constructor Detail

Role

public Role(java.lang.String roleName)
Method Detail

get

public java.lang.String get(Element element)
Gets the role for the element element. If none is set, "" is returned.

Parameters:
element - HTML element
Returns:
The role attribute value

getName

public java.lang.String getName()
Gets the role name

Returns:
The role name

remove

public void remove(Element element)
Removes the role for element element

Parameters:
element - HTML element

set

public void set(Element element)
Sets the role to element element

Parameters:
element - HTML element

GWT 2.5.0.rc1