Skip to content

Commit

Permalink
Incubates #7282
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelDCurran committed Jun 15, 2017
2 parents 09a6684 + 09a0d57 commit 9ba5fa6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/NVDAObjects/UIA/__init__.py
Expand Up @@ -1307,6 +1307,16 @@ def event_valueChange(self):
return
return super(UIA, self).event_valueChange()

def event_UIA_systemAlert(self):
"""
A base implementation for UI Automation's system Alert event.
This just reports the element that received the alert in speech and braille, similar to how focus is presented.
Skype for business toast notifications being one example.
"""
speech.speakObject(self, reason=controlTypes.REASON_FOCUS)
# Ideally, we wouldn't use getBrailleTextForProperties directly.
braille.handler.message(braille.getBrailleTextForProperties(name=self.name, role=self.role))

class TreeviewItem(UIA):

def _get_value(self):
Expand Down
1 change: 1 addition & 0 deletions source/_UIAHandler.py
Expand Up @@ -137,6 +137,7 @@
#UIA_AsyncContentLoadedEventId:"documentLoadComplete",
#UIA_ToolTipClosedEventId:"hide",
UIA_Window_WindowOpenedEventId:"UIA_window_windowOpen",
UIA_SystemAlertEventId:"UIA_systemAlert",
}

class UIAHandler(COMObject):
Expand Down

0 comments on commit 9ba5fa6

Please sign in to comment.