Repository: nvaccess/nvda

Issue:
NVDA and Windows 10 Start Menu: reporting typed text after closing the menu
This is a long standing issue with NVDA.

1. Open the Windows 10 Start menu.
2. Type in the name of an app/program like' Notepad'. If you type 'Note' for example, that should be sufficient, and I recommend that because the issue would become easier to spot.
3. Press Enter. The menu will close and something happens before Notepad starts.

Expected: NVDA just keeps quiet and Notepad starts.
Actual: NVDA says Note, Notepad etc. (whatever you typed) then starts the program as expected.

I have noticed this with:
NVDA as far back as 2015.3 to the latest Next snapshot.
Windows 10 as far back as 15240 to 15063.413 and still going.
Speak typed characters and words both on and off. It doesn't matter.



Discussion:
CC @MichaelDCurran, looks like something odd is going on with our suggestions list item handler.

 

From: fisher729 [mailto:notifications@github.com] 
Sent: Monday, July 10, 2017 9:13 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [nvaccess/nvda] NVDA and Windows 10 Start Menu: reporting typed text after closing the menu (#7370)

 

This is a long standing issue with NVDA.

1.	Open the Windows 10 Start menu.
2.	Type in the name of an app/program like' Notepad'. If you type 'Note' for example, that should be sufficient, and I recommend that because the issue would become easier to spot.
3.	Press Enter. The menu will close and something happens before Notepad starts.

Expected: NVDA just keeps quiet and Notepad starts.
Actual: NVDA says Note, Notepad etc. (whatever you typed) then starts the program as expected.

I have noticed this with:
NVDA as far back as 2015.3 to the latest Next snapshot.
Windows 10 as far back as 15240 to 15063.413 and still going.
Speak typed characters and words both on and off. It doesn't matter.

—
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/7370> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkCiVGD-b9bYSHduVK9rC92NpSnz2ks5sMk2SgaJpZM4OTEqJ> .


Actually, this is due to the enter key handler used to read automatically inserted text on the next line; e.g. automatic numbering in Word. It can be fixed by setting announceNewLineText to False for the search field.

P3 because it's superfluous but otherwise harmless, but should be fairly easy to fix.
Hi Andre, do you know other places where this should be handled? Let me know so a PR can be submitted tomorrow. Thanks.

 

From: James Teh [mailto:notifications@github.com] 
Sent: Monday, July 10, 2017 5:20 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Comment <comment@noreply.github.com>
Subject: Re: [nvaccess/nvda] NVDA and Windows 10 Start Menu: reporting typed text after closing the menu (#7370)

 

Actually, this is due to the enter key handler used to read automatically inserted text on the next line; e.g. automatic numbering in Word. It can be fixed by setting announceNewLineText to False for the search field.

P3 because it's superfluous but otherwise harmless, but should be fairly easy to fix.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/7370#issuecomment-314286486> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkOeRJ7sqimfVjF5dUeMPM5JhPyulks5sMr-fgaJpZM4OTEqJ> .


No. not at this time. The start menu is the only one that stands out now.

On 7/10/17, Joseph Lee <notifications@github.com> wrote:
> Hi Andre, do you know other places where this should be handled? Let me know
> so a PR can be submitted tomorrow. Thanks.
>
>
>
> From: James Teh [mailto:notifications@github.com]
> Sent: Monday, July 10, 2017 5:20 PM
> To: nvaccess/nvda <nvda@noreply.github.com>
> Cc: Joseph Lee <joseph.lee22590@gmail.com>; Comment
> <comment@noreply.github.com>
> Subject: Re: [nvaccess/nvda] NVDA and Windows 10 Start Menu: reporting typed
> text after closing the menu (#7370)
>
>
>
> Actually, this is due to the enter key handler used to read automatically
> inserted text on the next line; e.g. automatic numbering in Word. It can be
> fixed by setting announceNewLineText to False for the search field.
>
> P3 because it's superfluous but otherwise harmless, but should be fairly
> easy to fix.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/nvaccess/nvda/issues/7370#issuecomment-314286486> , or
> mute the thread
> <https://github.com/notifications/unsubscribe-auth/AHgLkOeRJ7sqimfVjF5dUeMPM5JhPyulks5sMr-fgaJpZM4OTEqJ>
> .
>
>
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly or view it on GitHub:
> https://github.com/nvaccess/nvda/issues/7370#issuecomment-314289449


Resolving patch:
diff --git a/source/appModules/searchui.py b/source/appModules/searchui.py
--- a/source/appModules/searchui.py
+++ b/source/appModules/searchui.py
@@ -1,10 +1,16 @@
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2015-2016  NV Access Limited
+#Copyright (C) 2015-2017 NV Access Limited, Joseph Lee
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
 import appModuleHandler
 from NVDAObjects.IAccessible import IAccessible, ContentGenericClient
+from NVDAObjects.UIA import UIA, SearchField
+
+class StartMenuSearchField(SearchField):
+
+		# #7370: do not announce text when start menu (searchui) closes.
+	announceNewLineText = False
 
 class AppModule(appModuleHandler.AppModule):
 
@@ -16,3 +22,6 @@ def chooseNVDAObjectOverlayClasses(self,obj,clsList):
 				clsList.remove(ContentGenericClient)
 			except ValueError:
 				pass
+		elif isinstance(obj, UIA):
+			if obj.UIAElement.cachedAutomationID == "SearchTextBox":
+				clsList.insert(0, StartMenuSearchField)


Test patch: