I'm starting to work on making the PDF plug-in fully accessible on all platforms.
As a first step I'm trying to ensure that the existing HTML controls inside the PDF extension are accessible as part of the outer page, but it's not working in the case where the PDF is embedded inside another webpage.
To repro:
1. Make sure out-of-process iframes is OFF. (The codepath with OOPIF on works.)
2. Open a .pdf directly in the address bar
3. Open chrome://accessibility and confirm that the accessibility tree for the top-level webpage with the .pdf url contains the full subtree, which contains the PDF toolbar and other controls. You can also verify this by opening a screen reader.
4. Now open an HTML page with an embedded pdf, like:
<embed src="1040ez.pdf" width="600" height="500">
5. Open chrome://accessibility and see that the accessibility tree for the top-level webpage does not include the PDF content
In debugging this, the issue happens when we're trying to walk from the outer webpage's accessibility tree into the accessibility tree of the PDF extension, which is embedded in the page using a browser plugin / guest WebContents. It's failing in RenderFrameHostImpl::BrowserPluginInstanceIDToAXTreeID
We seem to have a valid browser plugin instance ID from the <embed> in the parent page. But when we call RenderFrameHostDelegate::GetGuestByInstanceID, we get back NULL.
Comment 1 by dmazz...@chromium.org
, Apr 14 2016