Element overlayContainer = VOverlay.getOverlayContainer(this);
Roles.getAlertRole().setAriaLiveProperty(overlayContainer,
LiveValue.ASSERTIVE);
- setOverlayContainerLabel(getUIConnector().getState().overlayContainerLabel);
+ VOverlay.setOverlayContainerLabel(this,
+ getUIConnector().getState().overlayContainerLabel);
Roles.getAlertRole().setAriaRelevantProperty(overlayContainer,
RelevantValue.ADDITIONS);
}
public void handlePushMessage(String message) {
handleJSONText(message, 200);
}
-
- /**
- * Set the label of the container element, where tooltip, notification and
- * dialgs are added to.
- *
- * @param overlayContainerLabel
- * label for the container
- */
- public void setOverlayContainerLabel(String overlayContainerLabel) {
- Roles.getAlertRole().setAriaLabelProperty(
- VOverlay.getOverlayContainer(this),
- getUIConnector().getState().overlayContainerLabel);
- }
}
package com.vaadin.client.ui;
import com.google.gwt.animation.client.Animation;
+import com.google.gwt.aria.client.Roles;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.IFrameElement;
import com.google.gwt.dom.client.Style;
return container;
}
+ /**
+ * Set the label of the container element, where tooltip, notification and
+ * dialgs are added to.
+ *
+ * @param applicationConnection
+ * the application connection for which to change the label
+ * @param overlayContainerLabel
+ * label for the container
+ */
+ public static void setOverlayContainerLabel(
+ ApplicationConnection applicationConnection,
+ String overlayContainerLabel) {
+ Roles.getAlertRole().setAriaLabelProperty(
+ VOverlay.getOverlayContainer(applicationConnection),
+ overlayContainerLabel);
+ }
+
@Override
public void center() {
super.center();
import com.vaadin.client.ui.ClickEventHandler;
import com.vaadin.client.ui.ShortcutActionHandler;
import com.vaadin.client.ui.VNotification;
+import com.vaadin.client.ui.VOverlay;
import com.vaadin.client.ui.VUI;
import com.vaadin.client.ui.layout.MayScrollChildren;
import com.vaadin.client.ui.window.WindowConnector;
}
if (stateChangeEvent.hasPropertyChanged("overlayContainerLabel")) {
- getConnection().setOverlayContainerLabel(
+ VOverlay.setOverlayContainerLabel(getConnection(),
getState().overlayContainerLabel);
}
}