Screen readers will not read highlighted text inside a PDF
Categories
(Firefox :: PDF Viewer, defect, P3)
Tracking
()
Accessibility Severity | s2 |
People
(Reporter: marco, Unassigned)
Details
(Keywords: access)
Open a PDF with highlights, the screen reader will read the text behind the highlight but will not say that the text is highlighted.
Adobe Reader, Edge, and Preview are also affected by this bug.
Comment 1•8 months ago
|
||
Looks like an S2 from an accessibility perspective, unless there's another way for blind users to tell that the text is highlighted.
Comment 2•8 months ago
|
||
The severity field is not set for this bug.
:calixte, could you have a look please?
For more information, please visit BugBot documentation.
Updated•7 months ago
|
Comment 3•2 months ago
|
||
This bug is a an uneasy one.
On the pdf side, the highlight annotation should (I'd prefer must) contain the the boxes used to highlight.
So if we want to know what is the text behind the highlight we must compute the intersection of the glyphes bounding boxes with the ones used for highlighting and then we can know what is the exact highlighted text.
That said, some pdf producers (like Acrobat) are adding the highlighted text in the struct tree when it's existing
So there are two things we can do right now to slightly improve the situation:
- add the highlighted text in the struct tree.
- use the one we've in the struct tree and link it to the text layer (if it's possible).
Reporter | ||
Comment 4•11 hours ago
|
||
What is the expected behavior here?
Should we read the whole text, and then say which part is highlighted?
Comment 5•8 hours ago
|
||
The section of text that's highlighted should have attached formatting information in a way that screen readers can report. For instance, if you load a text fragments URL like data:text/html,abc<div>def</div>ghi#:~:text=def
, and navigate with a screen reader to the highlighted text "def", you should be able to get it to report the formatting. In VoiceOver, the shortcut is VO+T. On my machine, it reports "highlighted" as you'd expect. (Side note: the same should work for the <mark> element, but that's slightly bugged in Firefox on macOS currently.) You could give a section of highlighted text the ARIA mark
role to communicate the highlighted state.
Usually, screen readers won't report that something is highlighted unless you ask them to. In VO and NVDA, it's a special keyboard shortcut. Ultimately, it may not be hugely important to users to know about highlights, but it's good to make it possible to access for SR users.
Description
•