diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 16 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VOverlay.java | 18 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/ui/UIConnector.java | 3 |
3 files changed, 22 insertions, 15 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index ed9fe88269..2f5401a75b 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -466,7 +466,8 @@ public class ApplicationConnection { 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); } @@ -3433,17 +3434,4 @@ public class ApplicationConnection { 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); - } } diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java index 9e809758ca..ced476f9dd 100644 --- a/client/src/com/vaadin/client/ui/VOverlay.java +++ b/client/src/com/vaadin/client/ui/VOverlay.java @@ -17,6 +17,7 @@ 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; @@ -690,6 +691,23 @@ public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> { 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(); diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index e734d420f2..bba9252d47 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -58,6 +58,7 @@ import com.vaadin.client.ui.AbstractSingleComponentContainerConnector; 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; @@ -631,7 +632,7 @@ public class UIConnector extends AbstractSingleComponentContainerConnector } if (stateChangeEvent.hasPropertyChanged("overlayContainerLabel")) { - getConnection().setOverlayContainerLabel( + VOverlay.setOverlayContainerLabel(getConnection(), getState().overlayContainerLabel); } } |