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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 10 07:17:20 PDT 2021


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

--- Comment #18 from Andres Gonzalez <andresg_22 at apple.com> ---
(In reply to Tyler Wilcock from comment #13)
> Created attachment 437808 [details]
> Patch

--- a/LayoutTests/accessibility/mac/basic-embed-pdf-accessibility.html
+++ a/LayoutTests/accessibility/mac/basic-embed-pdf-accessibility.html

+        for (var index of traversalPath) {

better practice is let index instead of var index, because var bumps up the scope of index.

+            await waitFor(() => {
+                pdfEmbedElement = accessibilityController.accessibleElementById("pdfEmbed");
+                return pdfEmbedElement.children.length >= 1;
+            });

return pdfEmbedElement && pdfEmbedElement.children.length >= 1;

wouldn't crash otherwise if pdfEmbedElement is null?

+            await waitFor(() => {
+                pdfAxObject = pdfEmbedElement.childAtIndex(0);
+                return pdfAxObject.children.length >= 1;
+            });

Same as above for pdfAxObject.

+            await waitFor(() => {
+                pdfLayerController = pdfAxObject.childAtIndex(0);
+                return pdfLayerController.children.length >= 1;
+            });

and for pdfLayerController.

-- 
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/20210910/1baabe3b/attachment.htm>


More information about the webkit-unassigned mailing list