def event_suggestionsOpened(self):
super(SearchField, self).event_suggestionsOpened()
# Announce number of items found (except in Start search box where the suggestions are selected as user types).
# Oddly, Edge's address omnibar returns 0 for suggestion count when there are clearly suggestions (implementation differences).
# Because inaccurate count could be announced (when users type, suggestion count changes), thus announce this if position info reporting is enabled.
if config.conf["presentation"]["reportObjectPositionInformation"]:
if self.UIAElement.cachedAutomationID == "TextBox" or self.UIAElement.cachedAutomationID == "SearchTextBox" and self.appModule.appName != "searchui":
# Item count must be the last one spoken.
suggestionsCount = self.controllerFor[0].childCount
suggestionsMessage = "1 suggestion" if suggestionsCount == 1 else "%s suggestions"%suggestionsCount
queueHandler.queueFunction(queueHandler.eventQueue, ui.message, suggestionsMessage)
评论列表
文章目录