diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py index 64940454722..1127da1834c 100644 --- a/source/NVDAObjects/UIA/__init__.py +++ b/source/NVDAObjects/UIA/__init__.py @@ -27,6 +27,7 @@ import config import speech import api +import eventHandler import textInfos from logHandler import log from UIAHandler.types import ( @@ -2035,6 +2036,20 @@ def event_UIA_notification(self, notificationKind=None, notificationProcessing=U speech.cancelSpeech() ui.message(displayString) + def event_UIA_itemStatus(self): + """ + Base implementation of UIA item status property event. + By default NVDA will announce element name and item status if any. + """ + itemStatus = self.UIAElement.currentItemStatus + # Filter duplicate events. + if ( + eventHandler.isPendingEvents(eventName="UIA_itemStatus", obj=self) + ): + return + ui.message(f"{self.name} {itemStatus}") + + class TreeviewItem(UIA): def _get_value(self):