Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IE11: aria-describedby on buttons inside iFrames not respected #5784
Normally, NVDA correctly reads the describedby element associated with a button, as in the example on this web page: http://3needs.org/en/testing/code/aria-describedby-1.html
However, if that page is inserted into an iFrame, the describedby element is no longer read in IE 11. This can be seen by creating the following page:
The search for a describedby element seems to occur only in the elements outside the iFrame. If you change the page to the following...
NVDA will identify the div outside the iFrame as the describedby element rather than the describedby element inside the iFrame.
This is probably a problem with IE 11, but I figured I'd at least let the issue be known.
The bug is in virtualBuffers/MSHTML.py, class MSHTMLTextInfo(VirtualBufferTextInfo), method _normalizeControlField. The code looking up variable descNode is using the root html document, it does not consider the button may be in an embedded iframe. The attrs parameter of the method has iframe related information which may be used to retrieve the correct description from the iframe.
Ah. Nice catch. I was assuming the reporter was dealing with focus mode, but this would certainly happen if you read the buttons in browse mode (which is more likely). I don't think it's possible to get the correct frame document directly. Instead, I think we'll need to use NVDAObjects.IAccessible.MSHTML.locateHTMLElementByID, which is ridiculously expensive, but such is life with IE.