mozilla / mozilla/pdf.js

[Bug]: Screenreader support in PDFjs 5.x not working as expected

Open
#20,790 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility
Dominant language
JavaScript
Stars
53.9k
Forks
10.7k
Avg merge
18h 38m
Merged PRs (30d)
130

Description

I have some issues with reading tagged PDF's with screenreaders. On Mac there's a different situation with every browser (Safari, Chrome, Firefox), with the same hosted PDFjs and same tagged PDF document.
Here's a test with VoiceOver on MacOS Sequoia (older version). But same experience on Chrome on Windows 11.

Safari 18.4 (legacy PDFjs only works) renders the headings with text (although it breaks a single heading into multiple headings of the same level), focus on the heading itself.

Screenshot PDFjs in Safari with testdocument, braille viewer and caption are visible

Chrome 145.0.x (modern PDFjs and legacy PDFjs): only announce headings level 1,2,3 etc. No content. No focus on the heading text.

Screenshot PDFjs in Chrome with testdocument, braille viewer and caption are visible

Firefox 148.0 (modern PDFjs): Best experience, announces the headings like the way they are. Doesn't give focus though on that heading.

Screenshot PDFjs in Firefox with testdocument, braille viewer and caption are visible

In PDFjs 4.x I don't have this issues.

Web browser and its version

Chrome, Firefox, Safari

Operating system and its version

MacOS Sequoia 15.4.1

PDF.js version

Latest, demo version from GitHub page

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem
  1. Open modern PDFjs or legacy PDFjs
  2. Choose open in the menu
  3. Load a tagged PDF, I've tried the following (Dutch): summary.pdf
  4. Activate VoiceOver screenreader on Mac (command F5) or Narrator (built in) or NVDA screenreader on Windows
  5. Use arrow keys to navigate/ tab and use the H of heading to navigate to the headings.
What is the expected behavior?
  • Focus on heading
  • Announcing the heading like Firefox does but then browser wide
What went wrong?

No announcement of the content of headers, no focus on header.

Link to a viewer

https://mozilla.github.io/pdf.js/web/viewer.html

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in the modern and legacy viewer.html entry points with the linked tagged PDF, using VoiceOver, Narrator, or NVDA across Safari, Chrome, and Firefox. Compare PDF.js 5.x with 4.x and verify that headings expose their content and receive focus consistently, matching the expected behavior described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.