diff options
author | Jarno Rantala <jarno.rantala@vaadin.com> | 2013-10-28 14:53:54 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-10-29 10:22:09 +0000 |
commit | f5feaa2e3a8aebace6d9978131b192ed8b046557 (patch) | |
tree | 4edba0cd0e2c23092b28051d3ad4dba4d58a3039 | |
parent | 3bbf30054f865990f6c9089bd8f73e2e7a41b3f5 (diff) | |
download | vaadin-framework-f5feaa2e3a8aebace6d9978131b192ed8b046557.tar.gz vaadin-framework-f5feaa2e3a8aebace6d9978131b192ed8b046557.zip |
Forces small delay before showing accessible tooltip on focus (#12849)
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
-rw-r--r-- | client/src/com/vaadin/client/VTooltip.java | 2 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java index e687712b9c..e5c2ba117a 100644 --- a/client/src/com/vaadin/client/VTooltip.java +++ b/client/src/com/vaadin/client/VTooltip.java @@ -428,7 +428,7 @@ public class VTooltip extends VWindowOverlay { } else { updatePosition(event, isFocused); - if (isShowing()) { + if (isShowing() && !isFocused) { replaceCurrentTooltip(); } else { showTooltip(); diff --git a/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java b/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java index cc75f87a71..24dc942171 100644 --- a/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java +++ b/uitest/src/com/vaadin/tests/components/button/ButtonsWaiAria.java @@ -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) { |