From a3c4cde096b437e68f381b336058ae24ce68eca5 Mon Sep 17 00:00:00 2001 From: Gurpreet Singh <89442400+gurpreet-wpf@users.noreply.github.com> Date: Tue, 9 Nov 2021 17:04:36 +0530 Subject: [PATCH 1/2] Update tooltip.md https://github.com/dotnet/wpf/issues/5132 Updating tooltip specs (CTRL and ESP will close any tooltip) as per the latest requirements from Accessibility team. --- src/Microsoft.DotNet.Wpf/specs/tooltip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/specs/tooltip.md b/src/Microsoft.DotNet.Wpf/specs/tooltip.md index 16844263a12..85c92e14528 100644 --- a/src/Microsoft.DotNet.Wpf/specs/tooltip.md +++ b/src/Microsoft.DotNet.Wpf/specs/tooltip.md @@ -84,7 +84,7 @@ A tooltip closes for one of the following reasons. - **Timeout**. When the tooltip's `ShowDuration` time expires, the tooltip closes. - **Hover ends**. When the tooltip opened due to hover, moving the mouse outside a "safe region" closes the tooltip. Moving the mouse in a straight line between the parent and the tooltip stays within the safe region. -- **Keyboard Shortcut**. When the parent has keyboard focus, typing Ctrl+Shift+F10 or simply Ctrl (without any other keys) closes the tooltip. +- **Keyboard Shortcut**. Typing Ctrl+Shift+F10 or simply Ctrl closes any open tooltip whether it is opened from keyboard or mouse. Typing ESC closes any open tooltip. - **Focus loss**. When the tooltip opened due to keyboard activity, moving keyboard focus away from the parent element closes the tooltip. - **Editor activity**. When the parent has a text editor, any editor activity closes the tooltip. Elements with editors include `TextBoxBase`, `PasswordBox`, `DocumentViewerBase`, `FlowDocumentScrollViewer`, and classes derived from these. From 756e73b2cd236c69d6bc39436ee395476914b9ba Mon Sep 17 00:00:00 2001 From: Gurpreet Singh <89442400+gurpreet-wpf@users.noreply.github.com> Date: Fri, 12 Nov 2021 10:34:35 +0530 Subject: [PATCH 2/2] Update tooltip.md Tooltip Spec update --- src/Microsoft.DotNet.Wpf/specs/tooltip.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.Wpf/specs/tooltip.md b/src/Microsoft.DotNet.Wpf/specs/tooltip.md index 85c92e14528..1505319200a 100644 --- a/src/Microsoft.DotNet.Wpf/specs/tooltip.md +++ b/src/Microsoft.DotNet.Wpf/specs/tooltip.md @@ -84,7 +84,7 @@ A tooltip closes for one of the following reasons. - **Timeout**. When the tooltip's `ShowDuration` time expires, the tooltip closes. - **Hover ends**. When the tooltip opened due to hover, moving the mouse outside a "safe region" closes the tooltip. Moving the mouse in a straight line between the parent and the tooltip stays within the safe region. -- **Keyboard Shortcut**. Typing Ctrl+Shift+F10 or simply Ctrl closes any open tooltip whether it is opened from keyboard or mouse. Typing ESC closes any open tooltip. +- **Keyboard Shortcut**. When the keyboard focus lies within a window, typing Ctrl+Shift+F10 or ESC or simply Ctrl (without any other keys) closes any open tooltip within that window, whether it was opened from keyboard or mouse. Note: Esc may have consequences beyond the tooltip, and the user would be taking that responsibility on if they do not choose to use Ctrl. - **Focus loss**. When the tooltip opened due to keyboard activity, moving keyboard focus away from the parent element closes the tooltip. - **Editor activity**. When the parent has a text editor, any editor activity closes the tooltip. Elements with editors include `TextBoxBase`, `PasswordBox`, `DocumentViewerBase`, `FlowDocumentScrollViewer`, and classes derived from these. @@ -159,6 +159,9 @@ Henceforth it will be 1000 (1 second). **Typing Ctrl to dismiss the tooltip**. This response is triggered by the KeyUp event, and only if no other keys have been pressed since the KeyDown event. +**Typing Esc to dismiss the tooltip**. +This response is triggered by the KeyDown event. + **Safe region**. The implementation is expected to find a safe region with a third property: