List of usage examples for com.google.gwt.aria.client Roles getTooltipRole
public static TooltipRole getTooltipRole()
From source file:com.vaadin.client.VTooltip.java
License:Apache License
/** * Used to show tooltips; usually used via the singleton in * {@link ApplicationConnection}. NOTE that #setOwner(Widget)} should be * called after instantiating./*from w w w .j a v a 2 s . com*/ * * @see ApplicationConnection#getVTooltip() */ public VTooltip() { super(false, false, true); setStyleName(CLASSNAME); FlowPanel layout = new FlowPanel(); setWidget(layout); layout.add(em); DOM.setElementProperty(description, "className", CLASSNAME + "-text"); DOM.appendChild(layout.getElement(), description); setSinkShadowEvents(true); // When a tooltip is shown, the content of the tooltip changes. With a // tooltip being a live-area, this change is notified to a assistive // device. Roles.getTooltipRole().set(getElement()); Roles.getTooltipRole().setAriaLiveProperty(getElement(), LiveValue.ASSERTIVE); Roles.getTooltipRole().setAriaRelevantProperty(getElement(), RelevantValue.ADDITIONS); // Tooltip needs to be on top of other VOverlay elements. setZIndex(VOverlay.Z_INDEX + 1); }