Skip to content

Commit c20476f

Browse files
authored
Merge 924db88 into 49045d2
2 parents 49045d2 + 924db88 commit c20476f

2 files changed

Lines changed: 20 additions & 9 deletions

File tree

source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ def event_show(self):
5151
eventHandler.queueEvent("UIA_elementSelected", candidateItem)
5252

5353

54+
def event_focusEntered(self):
55+
# #14023: announce visible IME candidates.
56+
if (
57+
self.parent.UIAAutomationId == "IME_Candidate_Window"
58+
and config.conf["inputComposition"]["autoReportAllCandidates"]
59+
):
60+
ui.message(self.firstChild.visibleCandidateItemsText)
61+
62+
5463
class ImeCandidateItem(CandidateItemBehavior, UIA):
5564
"""
5665
A UIAutomation-based IME candidate Item (such as for the modern Chinese Microsoft Quick input).
@@ -93,14 +102,6 @@ def _get_basicText(self):
93102
return super(ImeCandidateItem, self).name
94103

95104
def event_UIA_elementSelected(self):
96-
# In Windows 11, focus event is fired when a candidate item receives focus,
97-
# therefore ignore this event for now.
98-
# #16283: do handle hardware keyboard input suggestions.
99-
if (
100-
winVersion.getWinVer() >= winVersion.WIN11
101-
and isinstance(api.getFocusObject().parent, ImeCandidateUI)
102-
):
103-
return
104105
oldNav = api.getNavigatorObject()
105106
if isinstance(oldNav, ImeCandidateItem) and self.name == oldNav.name:
106107
# Duplicate selection event fired on the candidate item. Ignore it.
@@ -116,6 +117,14 @@ def event_UIA_elementSelected(self):
116117
self.appModule._lastImeCandidateVisibleText = newText
117118
# speak the new page
118119
ui.message(newText)
120+
# In Windows 11, focus event is fired when a candidate item receives focus,
121+
# therefore ignore this event for now.
122+
# #16283: do handle hardware keyboard input suggestions.
123+
if (
124+
winVersion.getWinVer() >= winVersion.WIN11
125+
and isinstance(api.getFocusObject().parent, ImeCandidateUI)
126+
):
127+
return
119128
# Now just report the currently selected candidate item.
120129
self.reportFocus()
121130

user_docs/en/changes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
* Improved reliability of automatic text readout, particularly in terminal applications. (#15850, #16027, @Danstiv)
2525
* Braille cursor routing is now much more reliable when a line contains one or more Unicode variation selectors or decomposed characters. (#10960, #16477, @mltony, @LeonarddeR)
2626
* NVDA will correctly announce selection changes when editing a cell's text in Microsoft Excel. (#15843)
27-
* In Windows 11 emoji panel, NVDA will no longer appear to get stuck when closing clipboard history. (#16347, @josephsl)
27+
* Windows 11 fixes:
28+
* In emoji panel, NVDA will no longer appear to get stuck when closing clipboard history. (#16347, @josephsl)
29+
* NVDA will once again announce visible candidates when opening Windows 11 IME interface. (#14023, @josephsl)
2830

2931
### Changes for Developers
3032

0 commit comments

Comments
 (0)