Skip to content

Commit f3a275b

Browse files
authored
Merge 26d03c1 into 52bf1ed
2 parents 52bf1ed + 26d03c1 commit f3a275b

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

source/appModules/searchui.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2015-2019 NV Access Limited, Joseph Lee
2+
# Copyright (C) 2015-2020 NV Access Limited, Joseph Lee
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -18,6 +18,15 @@ class StartMenuSearchField(SearchField):
1818

1919
class AppModule(appModuleHandler.AppModule):
2020

21+
def event_NVDAObject_init(self, obj):
22+
if isinstance(obj, UIA):
23+
# #10341: Build 18363 introduces modern search experience in File Explorer.
24+
# As part of this, suggestion count is part of a live region.
25+
# Although it is geared for Narrator, it is applicable to other screen readers as well.
26+
# The live region itself is a child of the one shown here.
27+
if obj.UIAAutomationId == "suggestionCountForNarrator" and obj.firstChild is not None:
28+
obj.name = obj.firstChild.name
29+
2130
def chooseNVDAObjectOverlayClasses(self,obj,clsList):
2231
if isinstance(obj, IAccessible):
2332
try:
@@ -27,7 +36,7 @@ def chooseNVDAObjectOverlayClasses(self,obj,clsList):
2736
except ValueError:
2837
pass
2938
elif isinstance(obj, UIA):
30-
if obj.UIAElement.cachedAutomationID == "SearchTextBox":
39+
if obj.UIAAutomationId == "SearchTextBox":
3140
clsList.insert(0, StartMenuSearchField)
3241
# #10329: Since 2019, some suggestion items are grouped inside another suggestions list item.
3342
# Because of this, result details will not be announced like in the past.

0 commit comments

Comments
 (0)