Attach (recommended) or Link to PDF file
In the standard viewer.html there seems to be an unnecessary tabindex on the #viewerContainer element:
|
<div id="viewerContainer" tabindex="0"> |
It is not clear to me why the element has tabindex on it. If I focus on it with my keyboard, there is no visual indicator that the element is focused.
Can it be removed?
Web browser and its version
Microsoft Edge Version 144.0.3719.115 (Official build) (arm64)
Operating system and its version
MacOS 26.2 (25C56)
PDF.js version
5.4.624
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
- Go to the demo: https://mozilla.github.io/pdf.js/web/viewer.html
- Use tab on the keyboard to cycle through elements. After the right-most element Tools, and before the first PDF page, focus is on the
#viewerContainer element
- See that nothing is visually indicated
- See that it appears unnecessary for there to be something to focus between the right-most element Tools. and the first PDF page
What is the expected behavior?
To me the expected behavior is that the #viewerContainer is not focusable. If it must be focusable, it should at least have a visual indication that it is focused.
What went wrong?
I used the keyboard to cycle through elements and saw that it focuses on #viewerContainer but I don't understand why it is in focus.
Link to a viewer
No response
Additional context
No response
Attach (recommended) or Link to PDF file
In the standard
viewer.htmlthere seems to be an unnecessary tabindex on the#viewerContainerelement:pdf.js/web/viewer.html
Line 839 in 384c620
It is not clear to me why the element has tabindex on it. If I focus on it with my keyboard, there is no visual indicator that the element is focused.
Can it be removed?
Web browser and its version
Microsoft Edge Version 144.0.3719.115 (Official build) (arm64)
Operating system and its version
MacOS 26.2 (25C56)
PDF.js version
5.4.624
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
#viewerContainerelementWhat is the expected behavior?
To me the expected behavior is that the
#viewerContaineris not focusable. If it must be focusable, it should at least have a visual indication that it is focused.What went wrong?
I used the keyboard to cycle through elements and saw that it focuses on
#viewerContainerbut I don't understand why it is in focus.Link to a viewer
No response
Additional context
No response