[Bug]: Screenreader support in PDFjs 5.x not working as expected
Nobody has claimed this yet.
- 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.
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.
Firefox 148.0 (modern PDFjs): Best experience, announces the headings like the way they are. Doesn't give focus though on that heading.
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
- Open modern PDFjs or legacy PDFjs
- Choose open in the menu
- Load a tagged PDF, I've tried the following (Dutch): summary.pdf
- Activate VoiceOver screenreader on Mac (command F5) or Narrator (built in) or NVDA screenreader on Windows
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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