Skip to content

Consider set reading order in struct tree + marked content #16564

@lajoima1

Description

@lajoima1

Attach (recommended) or Link to PDF file here:
SampleJuan.pdf

Configuration:

  • Web browser and its version: Chrome latest, firefox latest
  • Operating system and its version: mac monterey
  • PDF.js version: 3.6.172
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open attached document
  2. Use voiceover/nvda and go through with arrow keys until you reach the input fields.
  3. Notice that the two labels are read, followed immediately by the actual inputs.

What is the expected behavior? (add screenshot)

According to the reading order set in Acrobat, the labels should be read before their respective input field.

Screen Shot 2023-06-16 at 11 15 20 AM

What went wrong? (add screenshot)
I'm not sure if the text layer makes use of the reading order, and I don't know how I would even go about retrieving the reading order with the pdfjs API, couldn't find anything currently.

If anything comes out of this ticket, a way of retrieving the reading order would be nice.

In the web viewer, some aria-owns are added in the text layer and they reference the annotation layer. This works well if we are basing ourselves strictly on visual order. In some cases, like with form fields, we would like to consider the reading order set in Acrobat.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions