Tagged PDF images need more information
Categories
(Firefox :: PDF Viewer, defect, P1)
Tracking
()
People
(Reporter: bdahl, Assigned: calixte)
References
Details
(Keywords: access, Whiteboard: [pdfjs-accessibility] [fidefe-quality-foundation])
Attachments
(1 file)
Looking at Acrobat, it seems to map Figure to the image role in OS a11y APIs. I think it'd probably make sense for us to do the same; i.e. role="img" instead of role="figure". That will provide a more familiar experience and will allow screen readers to read it even when there's no content inside, except...
An additional problem is that screen readers ignore leaf elements with a width or height of 0, which is currently the case for pdf.js images even with role="img". So, these somehow need to get a non-0 width and height without breaking visual layout. Perhaps we could position them with the same coordinates as the actual image in the canvas? Alternatively, we could position them off-screen, but that's not ideal because the a11y coordinates will be wrong (impacts mouse routing, hit testing, etc.).
From https://bugzilla.mozilla.org/show_bug.cgi?id=1705139#c1
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Unfortunately, so far I've found images only sometimes have the bounding boxes in the structure tree. Often they only link to the image object in the PDF's content stream. To get the correct bounding box in the case where we only have the object link, we'd need to either evaluate the content stream or have the bounds be updated as we draw to canvas.
Comment 2•3 years ago
|
||
Note that while it isn't a final solution, positioning images off-screen with a non-0 width and height would at least allow screen readers to see them, which isn't possible right now because they have a width and height of 0. Is it worth filing a separate bug to do that as an interim hack? I assume that's far less work but would be a worthwhile win.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Access-s2 because screen reader users can't access image alt text at all right now. However, if the off-screen hack (comment 2) were implemented (assuming it's easier), we could drop this to access-s3.
Assignee | ||
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
Clearing the needinfo for now, but I'll add this to the list of things we want to do on the next round of work on pdf.js.
Assignee | ||
Updated•3 years ago
|
Comment 5•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last months and this bug has severity 'S2'.
:calixte, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 7•2 months ago
|
||
Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Description
•