OSDN Git Service

NVDAObjects.IAccessible.MSHTML.locateHTMLElementByID: It's not possible to get an...
authorJames Teh <jamie@jantrid.net>
Fri, 17 Jun 2011 05:32:15 +0000 (15:32 +1000)
committerJames Teh <jamie@jantrid.net>
Fri, 17 Jun 2011 05:32:15 +0000 (15:32 +1000)
Fixes NotImplementedError exceptions on pages containing such iframes.
Fixes #1569.

source/NVDAObjects/IAccessible/MSHTML.py
user_docs/en/changes.t2t

index 8522c04..af635a9 100644 (file)
@@ -120,7 +120,12 @@ def locateHTMLElementByID(document,ID):
                log.debugWarning("document.getElementsByTagName failed with COMError %s"%e)\r
                return None\r
        for frame in frames:\r
-               pacc=IAccessibleFromHTMLNode(frame)\r
+               try:\r
+                       pacc=IAccessibleFromHTMLNode(frame)\r
+               except NotImplementedError:\r
+                       # #1569: It's not possible to get an IAccessible from frames marked with an ARIA role of presentation.\r
+                       # In this case, just skip this frame.\r
+                       continue\r
                res=IAccessibleHandler.accChild(pacc,1)\r
                if not res: continue\r
                childElement=HTMLNodeFromIAccessible(res[0])\r
index 3d34d5d..d77e787 100644 (file)
@@ -94,7 +94,8 @@ Highlights of this release include major improvements concerning punctuation and
 - Fixed the issue in NVDA's Voice Settings dialog where the value of sliders was sometimes not reported when changed. (#1411)\r
 - NVDA no longer fails to announce the new cell when moving in an Excel spreadsheet after cutting and pasting. (#1567)\r
 - NVDA no longer becomes worse at guessing color names the more colors it announces.\r
-  \r
+- In Internet Explorer and other MSHTML controls, fixed the inability to read parts of rare pages which contain iframes marked with an ARIA role of presentation. (#1569)\r
+\r
 \r
 == Changes for Developers ==\r
 - Developer documentation can now be generated using SCons. See readme.txt at the root of the source distribution for details, including associated dependencies.\r