[go: nahoru, domu]

Open Bug 1708040 Opened 3 years ago Updated 1 year ago

Tagged PDF images need more information

Categories

(Firefox :: PDF Viewer, defect, P1)

Unspecified
All
defect

Tracking

()

ASSIGNED
Accessibility Severity s2

People

(Reporter: bdahl, Assigned: calixte)

References

Details

(Keywords: access, Whiteboard: [pdfjs-accessibility] [fidefe-quality-foundation])

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

Blocks: tagged-pdf

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.

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.

Flags: needinfo?(bdahl)

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.

Keywords: access
Whiteboard: [access-s2]
Severity: -- → S2
Priority: -- → P3

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.

Flags: needinfo?(bdahl)
Whiteboard: [access-s2] → [access-s2][pdfjs-accessibility]

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: bdahl → nobody
Flags: needinfo?(cdenizet)
Flags: needinfo?(cdenizet)
Assignee: nobody → cdenizet
Status: NEW → ASSIGNED
Priority: P3 → P1
OS: Unspecified → All
Accessibility Severity: --- → s2
Whiteboard: [access-s2][pdfjs-accessibility] → [pdfjs-accessibility]
Whiteboard: [pdfjs-accessibility] → [pdfjs-accessibility] [fidefe-quality-foundation]
See Also: → 1844952
You need to log in before you can comment on or make changes to this bug.