|
GWT 2.5.0.rc1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.aria.client.Roles
public final class Roles
Class containing the ARIA roles as defined by W3C ARIA specification. A WAI-ARIA role is set on an element using a role attribute. An element role is constant and is not supposed to change.
This is the central class in this ARIA API because it contains all defined roles which
can be set to HTML elements. Each role in this class is a Role instance.
The Role class contains methods for getting and setting states and properties.
Lets say we have an image button widget and we want to make it visible to a reader as a button, accompanied with some help text for the button usage. For the purpose we need to add a 'button' role to the image and set label that the reader can interpret. We set the 'button' role for an image (img) with the call: Roles.getButtonRole.set(img.getElement()) and set the 'aria-label' property by calling: Roles.getButtonRole().setAriaLabelProperty(img.getElement, "test")
ARIA states are used similarly to ARIA properties by using the Roles.getButtonRole().setAriaEnabledState(img.getElement(), isEnabled) method. Although States and Properties are structurally the same, they are separated in 2 classes in this API because they are semantically different and have different usage. There exist the concept of extra properties and for now the only example is tabindex. If we want to set the tabindex to 0 for the button, we need to call Roles.getButtonRole().setTabindexExtraAttribute(img.getElement(), 0).
There are 4 groups of roles:
For more details about ARIA roles check
| Constructor Summary | |
|---|---|
Roles()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Roles()
| Method Detail |
|---|
public static AlertdialogRole getAlertdialogRole()
public static AlertRole getAlertRole()
public static ApplicationRole getApplicationRole()
public static ArticleRole getArticleRole()
public static BannerRole getBannerRole()
public static ButtonRole getButtonRole()
public static CheckboxRole getCheckboxRole()
public static ColumnheaderRole getColumnheaderRole()
public static ComboboxRole getComboboxRole()
public static ComplementaryRole getComplementaryRole()
public static ContentinfoRole getContentinfoRole()
public static DefinitionRole getDefinitionRole()
public static DialogRole getDialogRole()
public static DirectoryRole getDirectoryRole()
public static DocumentRole getDocumentRole()
public static FormRole getFormRole()
public static GridcellRole getGridcellRole()
public static GridRole getGridRole()
public static GroupRole getGroupRole()
public static HeadingRole getHeadingRole()
public static ImgRole getImgRole()
public static LinkRole getLinkRole()
public static ListboxRole getListboxRole()
public static ListitemRole getListitemRole()
public static ListRole getListRole()
public static LogRole getLogRole()
public static MainRole getMainRole()
public static MarqueeRole getMarqueeRole()
public static MathRole getMathRole()
public static MenubarRole getMenubarRole()
public static MenuitemcheckboxRole getMenuitemcheckboxRole()
public static MenuitemradioRole getMenuitemradioRole()
public static MenuitemRole getMenuitemRole()
public static MenuRole getMenuRole()
public static NavigationRole getNavigationRole()
public static NoteRole getNoteRole()
public static OptionRole getOptionRole()
public static PresentationRole getPresentationRole()
public static ProgressbarRole getProgressbarRole()
public static RadiogroupRole getRadiogroupRole()
public static RadioRole getRadioRole()
public static RegionRole getRegionRole()
public static RowgroupRole getRowgroupRole()
public static RowheaderRole getRowheaderRole()
public static RowRole getRowRole()
public static ScrollbarRole getScrollbarRole()
public static SearchRole getSearchRole()
public static SeparatorRole getSeparatorRole()
public static SliderRole getSliderRole()
public static SpinbuttonRole getSpinbuttonRole()
public static StatusRole getStatusRole()
public static TablistRole getTablistRole()
public static TabpanelRole getTabpanelRole()
public static TabRole getTabRole()
public static TextboxRole getTextboxRole()
public static TimerRole getTimerRole()
public static ToolbarRole getToolbarRole()
public static TooltipRole getTooltipRole()
public static TreegridRole getTreegridRole()
public static TreeitemRole getTreeitemRole()
public static TreeRole getTreeRole()
|
GWT 2.5.0.rc1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||