[Webkit-unassigned] [Bug 229556] AX: Make PDFs loaded via <embed> accessible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 8 14:46:02 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229556

--- Comment #11 from Tyler Wilcock <tyler_w at apple.com> ---
> can you verify reaching into the PDF document to get a node
> can you also do a hit test into the embedded object to ensure we return an element
Any time I hit test or descend into the PDF tree and try to get an attribute to use for test output, I get a crash like this:

Crashing on exception: -[PDFLayerController accessibilityAttributeValue:]: unrecognized selector sent to instance 0x1567298f0"

Or:

-[PDFLayerController accessibilityAttributeNames]: unrecognized selector sent to instance 0x10622c560

Here’s how I’m hit testing:

hitTestResult = accessibilityController.elementAtPoint(pdfAxObject.width / 2, pdfAxObject.height / 2)
shouldBe("hitTestResult.stringAttributeValue('AXRole')", "1");

Same result using `childAtIndex()` to descend into the PDF tree.

> Do we need the return value to be NSObject *?


I used NSObject * because that’s what PluginView::accessibilityObject() returns without my patch (this is the accessibilityObject we need to connect to the PDF tree):

https://github.com/WebKit/WebKit/blob/c4af6be06909465afa97c8f3490f13d0c42ad1dd/Source/WebKit/WebProcess/Plugins/PluginView.h#L90

I can try switching that to `id`, but I’d have to change downstream callers of that, too.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210908/6602ea8e/attachment-0001.htm>


More information about the webkit-unassigned mailing list