Repository: nvaccess/nvda

Issue:
Windows 10 1903/emoji panel: no opening announcement
Hi,

Partially blocks #9112: In Windows 10 Version 1903, when emoji panel opens, typical opening announcement is not made.

### Steps to reproduce:
1. Install Windows 10 Insider Preview build 18305 and later.
2. Try opening emoji panel (Windows+period) or cloud clipboard (Windows+V).

### Actual behavior:
NVDA becomes verbose when opening emoji panel instead of announcing the first selected emoji, and when cloud clipboard opens, no response from NVDA.

### Expected behavior:
NVDA announces first selected emoji and announces clipboard status when cloud clipboard is opened.

### System configuration
#### NVDA installed/portable/running from source:
Installed

#### NVDA version:
Alpha.16619

#### Windows version:
Windows 10 Version 1903 Preview (build 18323)

#### Name and version of other software in use when reproducing the issue:
None

#### Other information about your system:
Part of Windows Insider Program

### Other questions
#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Yes - 2018.4.1

### Technical information:
Until Version 1809, UIA window open event was fired by modern keyboard executable, but since 18305, File Explorer (explorer.exe) is responsible for firing window open event (a new UIA window with the class name of "ApplicationFrameWindow" is now the host of modern keyboard, and that window fires window open event).

Note that in case of emoji panel, it might actually be desirable to let NVDA become a bit verbose, since Version 1903 emoji panel will let users browse emojis, kaomoji, and symbols. Let us revisit this small change when it is shown that emoji panel will open to whatever grand category (emoji, kaomoji, symbols) one was browsing to last (currently it always defaults to emoji category).

Thanks.


Discussion:
Blocked by #10359 
@josephsl the coresponding pull request for the issue which you referenced above has been merged and the issue has been closed.
Hi, that I’ll take care of. Thanks.

 

From: Adriani90 <notifications@github.com> 
Sent: Friday, October 11, 2019 6:30 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Windows 10 1903/emoji panel: no opening announcement (#9204)

 

@josephsl <https://github.com/josephsl>  the coresponding pull request for the issue which you referenced above has been merged and the issue has been closed.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/9204?email_source=notifications&email_token=AB4AXEHYYQX3GTJ35QPWFFDQOB5U5A5CNFSM4GSSMEYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA776NQ#issuecomment-541065014> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4AXEGJOF5DHKOL4SJS7E3QOB5U5ANCNFSM4GSSMEYA> .



Resolving patch:
diff --git a/source/appModules/explorer.py b/source/appModules/explorer.py
--- a/source/appModules/explorer.py
+++ b/source/appModules/explorer.py
@@ -5,7 +5,7 @@
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
-"""App module for Windows Explorer (aka Windows shell).
+"""App module for Windows Explorer (aka Windows shell and renamed to File Explorer in Windows 8).
 Provides workarounds for controls such as identifying Start button, notification area and others.
 """
 
@@ -324,3 +324,24 @@ def event_gainFocus(self, obj, nextHandler):
 			return
 
 		nextHandler()
+
+	def isGoodUIAWindow(self, hwnd):
+		# #9204: shell raises window open event for emoji panel in build 18305 and later.
+		if winVersion.isWin10(version=1903) and winUser.getClassName(hwnd) == "ApplicationFrameWindow":
+			return True
+		return False
+
+	def event_UIA_window_windowOpen(self, obj, nextHandler):
+		# Send UIA window open event to input app window.
+		if isinstance(obj, UIA) and obj.UIAElement.cachedClassName == "ApplicationFrameWindow":
+			inputPanelWindow = obj.firstChild
+			inputPanelAppName = (
+				# 19H2 and earlier
+				"windowsinternal_composableshell_experiences_textinput_inputapp",
+				# 20H1 and later
+				"textinputhost"
+			)
+			if inputPanelWindow and inputPanelWindow.appModule.appName in inputPanelAppName:
+				eventHandler.executeEvent("UIA_window_windowOpen", inputPanelWindow)
+				return
+		nextHandler()
diff --git a/source/appModules/textinputhost.py b/source/appModules/textinputhost.py
--- a/source/appModules/textinputhost.py
+++ b/source/appModules/textinputhost.py
@@ -1,4 +1,4 @@
-# App module for Text Inpur Hoar (formerly Composable Shell (CShell) input panel)
+# App module for Text Input Host (formerly Composable Shell (CShell) input panel)
 # A part of NonVisual Desktop Access (NVDA)
 # Copyright (C) 2019 NV Access Limited, Joseph Lee
 # This file is covered by the GNU General Public License.


Test patch: