Repository: nvaccess/nvda

Issue:
Tool Tips are not read in UWP apps when "report tooltips" is enabled
If "Report Tooltips" is turned on, tooltip messages are reported in Desktop programs but not for UWP apps.

Steps to Reproduce:
1. Turn on report tooltips in object presentation.
2. Open a modern program such as Microsoft Edge.
3. Tab through the UI elements, not a web page. This is the area that includes the address bar, hub, etc.
Expected result: Tool tips should be read for most controls.
Actual Results: No tool tips are read.
But if you open Narrator, tool tips are read, and this is important because the tool tips contain the access keys needed to get to menus and other controls quickly. Without this, NVDA users will have no easy way to learn the access keys in this and other situations.
This is on Windows 10 build 17127.1 on a recent Master snapshot.

Thank you very much for your time and I look forward to any fixes you may be able to provide.

Sincerely,

Brandon Tyson



Discussion:
Hi, if it is what I think it is, then a basic solution will be created as part of my add-on first. Thanks.

 

From: btman16 <notifications@github.com> 
Sent: Friday, March 23, 2018 11:57 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [nvaccess/nvda] Tool Tips are not read in UWP apps when "report tooltips" is enabled (#8118)

 

If "Report Tooltips" is turned on, tooltip messages are reported in Desktop programs but not for UWP apps.

Steps to Reproduce:

1.	Turn on report tooltips in object presentation.
2.	Open a modern program such as Microsoft Edge.
3.	Tab through the UI elements, not a web page. This is the area that includes the address bar, hub, etc.
Expected result: Tool tips should be read for most controls.
Actual Results: No tool tips are read.
But if you open Narrator, tool tips are read, and this is important because the tool tips contain the access keys needed to get to menus and other controls quickly. Without this, NVDA users will have no easy way to learn the access keys in this and other situations.
This is on Windows 10 build 17127.1 on a recent Master snapshot.

Thank you very much for your time and I look forward to any fixes you may be able to provide.

Sincerely,

Brandon Tyson

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/8118> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkKPVIXK9a0gVdaER_Qbz3K8Zldy3ks5the47gaJpZM4S5oWz> .


Hi,

Technical: we do have UIA_tooltipOpened event ready to go. The question is where do we put the handler for UWP tooltips (perhaps a new overlay class).

CC @CToth, @MichaelDCurran, @LeonardDer

Resolving patch:
diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py
--- a/source/NVDAObjects/UIA/__init__.py
+++ b/source/NVDAObjects/UIA/__init__.py
@@ -28,7 +28,7 @@
 from UIAUtils import *
 from NVDAObjects.window import Window
 from NVDAObjects import NVDAObjectTextInfo, InvalidNVDAObject
-from NVDAObjects.behaviors import ProgressBar, EditableTextWithoutAutoSelectDetection, Dialog, Notification, EditableTextWithSuggestions
+from NVDAObjects.behaviors import ProgressBar, EditableTextWithoutAutoSelectDetection, Dialog, Notification, EditableTextWithSuggestions, ToolTip
 import braille
 from locationHelper import RectLTWH
 import ui
@@ -787,6 +787,10 @@ def findOverlayClasses(self,clsList):
 			clsList.append(Toast_win8)
 		elif self.windowClassName=="Windows.UI.Core.CoreWindow" and UIAControlType==UIAHandler.UIA_WindowControlTypeId and "ToastView" in self.UIAElement.cachedAutomationId: # Windows 10
 			clsList.append(Toast_win10)
+		# #8118: treat UIA tool tips (including those found in UWP apps) as proper tool tips, especially those found in Microsoft Edge and other apps.
+		# Windows 8.x toast, although a form of tool tip, is covered separately.
+		elif UIAControlType==UIAHandler.UIA_ToolTipControlTypeId:
+			clsList.append(ToolTip)
 		elif self.UIAElement.cachedFrameworkID in ("InternetExplorer","MicrosoftEdge"):
 			from . import edge
 			if UIAClassName in ("Internet Explorer_Server","WebView") and self.role==controlTypes.ROLE_PANE:
@@ -1641,6 +1645,12 @@ def event_UIA_window_windowOpen(self):
 			self.__class__._lastToastRuntimeID = toastRuntimeID
 		Notification.event_alert(self)
 
+
+class ToolTip(ToolTip, UIA):
+
+	event_UIA_toolTipOpened=ToolTip.event_show
+
+
 #WpfTextView fires name state changes once a second, plus when IUIAutomationTextRange::GetAttributeValue is called.
 #This causes major lags when using this control with Braille in NVDA. (#2759) 
 #For now just ignore the events.


Test patch: