]> source.dussan.org Git - vaadin-framework.git/commitdiff
Forces small delay before showing accessible tooltip on focus (#12849)
authorJarno Rantala <jarno.rantala@vaadin.com>
Mon, 28 Oct 2013 12:53:54 +0000 (14:53 +0200)
committerVaadin Code Review <review@vaadin.com>
Tue, 29 Oct 2013 10:22:09 +0000 (10:22 +0000)
Screen reader (JAWS 14) seems to get confused about the focused item if
the tooltip is shown on focus. This commit forces small delay before
showing the tooltip. More info, see
http://www.w3.org/TR/2011/CR-wai-aria-20110118/roles#tooltip

Change-Id: I2973a1a3844936e09fef28afe37a0ecbdda69122

client/src/com/vaadin/client/VTooltip.java
uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java

index e687712b9c76697022786828d6c92c2e25ad449a..e5c2ba117a55ef07ddcc49baf679751dde4de4f5 100644 (file)
@@ -428,7 +428,7 @@ public class VTooltip extends VWindowOverlay {
             } else {
                 updatePosition(event, isFocused);
 
-                if (isShowing()) {
+                if (isShowing() && !isFocused) {
                     replaceCurrentTooltip();
                 } else {
                     showTooltip();
index cc75f87a71dae19ac88ce579a2e23b0c91087a42..24dc9421714185cd69d378c9eb726172140decce 100644 (file)
@@ -32,6 +32,10 @@ public class ButtonsWaiAria extends ComponentTestCase<Button> {
         l = createButton("Tooltip Button", nat);
         l.setDescription("Tooltip");
         addTestComponent(l);
+
+        l = createButton("Another tooltip", nat);
+        l.setDescription("Another");
+        addTestComponent(l);
     }
 
     private Button createButton(String text, boolean nativeButton) {