diff --git a/source/IAccessibleHandler.py b/source/IAccessibleHandler.py index 9e8da8de386..f55a941895e 100644 --- a/source/IAccessibleHandler.py +++ b/source/IAccessibleHandler.py @@ -730,8 +730,8 @@ def processForegroundWinEvent(window,objectID,childID): def processShowWinEvent(window,objectID,childID): className=winUser.getClassName(window) - #For now we only support 'show' event for tooltips as otherwize we get flooded - if className in ("tooltips_class32","mscandui21.candidate","mscandui40.candidate","MSCandUIWindow_Candidate") and objectID==winUser.OBJID_CLIENT: + #For now we only support 'show' event for tooltips, IMM candidates and notification bars as otherwize we get flooded + if className in ("Frame Notification Bar","tooltips_class32","mscandui21.candidate","mscandui40.candidate","MSCandUIWindow_Candidate") and objectID==winUser.OBJID_CLIENT: NVDAEvent=winEventToNVDAEvent(winUser.EVENT_OBJECT_SHOW,window,objectID,childID) if NVDAEvent: eventHandler.queueEvent(*NVDAEvent) diff --git a/source/NVDAObjects/IAccessible/__init__.py b/source/NVDAObjects/IAccessible/__init__.py index d015059c36b..134ff63369c 100644 --- a/source/NVDAObjects/IAccessible/__init__.py +++ b/source/NVDAObjects/IAccessible/__init__.py @@ -1,4 +1,3 @@ -#NVDAObjects/IAccessible.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2012 NVDA Contributors #This file is covered by the GNU General Public License. @@ -31,7 +30,6 @@ from NVDAObjects import NVDAObject, NVDAObjectTextInfo, InvalidNVDAObject import NVDAObjects.JAB import eventHandler -import queueHandler from NVDAObjects.behaviors import ProgressBar, Dialog, EditableTextWithAutoSelectDetection, FocusableUnfocusableContainer def getNVDAObjectFromEvent(hwnd,objectID,childID): @@ -412,6 +410,12 @@ def findOverlayClasses(self,clsList): clsList.append(newCls) # Some special cases. + if windowClassName=="Frame Notification Bar" and role==oleacc.ROLE_SYSTEM_CLIENT: + clsList.append(IEFrameNotificationBar) + elif windowClassName=="DirectUIHWND" and role==oleacc.ROLE_SYSTEM_TOOLBAR: + parentWindow=winUser.getAncestor(self.windowHandle,winUser.GA_PARENT) + if parentWindow and winUser.getClassName(parentWindow)=="Frame Notification Bar": + clsList.append(IENotificationBar) if windowClassName.lower().startswith('mscandui'): import mscandui mscandui.findExtraOverlayClasses(self,clsList) @@ -1680,6 +1684,27 @@ class ListviewPane(IAccessible): TextInfo=displayModel.DisplayModelTextInfo name="" +class IEFrameNotificationBar(IAccessible): + + def event_show(self): + child=self.simpleFirstChild + if isinstance(child,Dialog): + child.event_alert() + +#The Internet Explorer notification toolbar should be handled as an alert +class IENotificationBar(Dialog,IAccessible): + name="" + role=controlTypes.ROLE_ALERT + + def event_alert(self): + speech.cancelSpeech() + speech.speakObject(self,reason=controlTypes.REASON_FOCUS) + child=self.simpleFirstChild + while child: + if child.role!=controlTypes.ROLE_STATICTEXT: + speech.speakObject(child,reason=controlTypes.REASON_FOCUS) + child=child.simpleNext + ###class mappings _staticMap={ diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 2a6fc60ea33..0fa6cb16f31 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -8,6 +8,7 @@ == New Features == - Basic support for reading and writing messages in Lotus Notes 8.5. (#543) - In Browse mode for MSHTML (e.g. Internet Explorer) and Gecko (e.g. Firefox), the existance of long descriptions are now announced. Its also possible to open the long description in a new window by pressing NVDA+d. (#809) +- Notifications in Internet Explorer 9 and above are now spoken (such as content blocking or file downloads). (#2343) == Bug Fixes ==