Images and Accessibility (ConTeXt LMTX 2025.04.28)

Dear All, I am starting a new thread as requested. I can confirm that
the following should work with current latest (from yesterday, LuaMetaTeX 2.11.07 20250427 + ConTeXt LMTX 2025.04.28 14:29):
\enabledirectives [backend.usetags=testing] \setuptagging[state=start] \setupstructure[state=start] \setupbackend [format=PDF/A-3a] \setupbackend[format=pdf/ua-1] \setupexternalfigures[location=default] \starttext \externalfigure[hacker][label={this is an image}]
\startparagraph a \stopparagraph \stoptext
produces a PDF that passes the accessibility check in the current Adobe Acrobat. In particular, it passes the alternate text checks. Hovering over the image shows the alternate text in Acrobat. However, VoiceOver (on the Mac) does not read the alternate text; it completely ignores the existence of the image. In Preview, no alternate text is shown or read. So it seems that the only benefit is that readers with vision can see an alternate text... I don’t have access to a Windows machine, so I cannot test what other screen readers can do with this document. Thanks, Matthias

On 4/29/25 19:13, Matthias Weber wrote:
Dear All,
I am starting a new thread as requested.
Hi Matthias,
I can confirm that [...] produces a PDF that passes the accessibility check in the current> Adobe Acrobat. In particular, it passes the alternate text checks. Hovering over the image shows the alternate text in Acrobat.
I think that alternate texts are primarily intended to be read aloud. In fact, the older PDF specification (the only one publicly avaiblable) describes them as (third row from https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008....): An alternate description of the structure element and its children in human-readable form, which is useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes. Displaying the alternate text when hovering the image is not in support of accessibility (I think), but just for other purposes.
However, VoiceOver (on the Mac) does not read the alternate text; it completely ignores the existence of the image.
In Preview, no alternate text is shown or read. So it seems that the> only benefit is that readers with vision can see an alternate text...
Sorry, could it be possible that both programs might not comply with accessibility as PDF requires it? Or do both programs read aloud the alternative text for the »Bundesadler« from https://www.recht.bund.de/bgbl/1/2025/104/regelungstext.pdf?__blob=publicationFile&v=3? Your final comment on the only benefit is not clear to me. Visually-impaired living beings (not especially humans) may find easier listening to sound or voices than seeing in general.
I don’t have access to a Windows machine, so I cannot test what other screen readers can do with this document.
I think the Accessibility Directive requires reading programs to comply by making them accessible (sorry, bad wording, but I guess it is clear what I mean [let me know if it is not]). I hope it helps, Pablo

Hi Pablo, I was merely reporting what Previews and Acrobat on the Mac do with the current image accessibility provided by ConTeXt. I have no idea whether that is enough for vision-impaired people. It might be that there are screen readers available that do a perfect job. At some point I will need to produce documents that are accessible. For that my documents will have to pass a test (to which I don’t have access before submitting the document…). I have no idea whether “passing the test” means that the document is usable for someone with vision impairment. Of course I would like that to be the case, too, but my abilities to test for any of that are limited. I tried the first page from https://www.recht.bund.de/bgbl/1/2025/104/regelungstext.pdf?__blob=publicationFile&v=3?. It passes Acrobat’s accessibility check, hovering over the image produces the alternate text, letting Acrobat read the document ignores the Bundesadler. When I use VoiceOver in Preview, it detects the image group and speaks the alternate text. But VoiceOver does not seem to be able to read the rest of the page. When, on the other hand, I let Preview read the entire page, it ignores the Bundesadler. What would help is if someone with access to a screen reader like JAWS or NVDA can report what it does with the compiled example in ConTexT. I am having similar issues with having formulas read on the Mac. I can see the XML attachments in Acrobat, but what Acrobat or Preview do with them is horrendous. And as for my final comment about the “only benefit”: It seems to me that the two programs I tried on the Mac are bringing no benefit to the vision-impaired. That’s said, but nothing ConTeXt can help with. It just makes everything more complicated, because I have no means of telling whether what I am trying to do to make documents accessible is effective in any way. Matthias
On Apr 29, 2025, at 3:20 PM, Pablo Rodriguez via ntg-context
wrote: On 4/29/25 19:13, Matthias Weber wrote:
Dear All,
I am starting a new thread as requested.
Hi Matthias,
I can confirm that [...] produces a PDF that passes the accessibility check in the current> Adobe Acrobat. In particular, it passes the alternate text checks. Hovering over the image shows the alternate text in Acrobat.
I think that alternate texts are primarily intended to be read aloud.
In fact, the older PDF specification (the only one publicly avaiblable) describes them as (third row from https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008....):
An alternate description of the structure element and its children in human-readable form, which is useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes.
Displaying the alternate text when hovering the image is not in support of accessibility (I think), but just for other purposes.
However, VoiceOver (on the Mac) does not read the alternate text; it completely ignores the existence of the image.
In Preview, no alternate text is shown or read. So it seems that the> only benefit is that readers with vision can see an alternate text...
Sorry, could it be possible that both programs might not comply with accessibility as PDF requires it?
Or do both programs read aloud the alternative text for the »Bundesadler« from https://www.recht.bund.de/bgbl/1/2025/104/regelungstext.pdf?__blob=publicationFile&v=3?
Your final comment on the only benefit is not clear to me. Visually-impaired living beings (not especially humans) may find easier listening to sound or voices than seeing in general.
I don’t have access to a Windows machine, so I cannot test what other screen readers can do with this document.
I think the Accessibility Directive requires reading programs to comply by making them accessible (sorry, bad wording, but I guess it is clear what I mean [let me know if it is not]).
I hope it helps,
Pablo ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________

On 4/29/25 23:17, Matthias Weber wrote:
Hi Pablo,
I was merely reporting what Previews and Acrobat on the Mac do with the current image accessibility provided by ConTeXt.
Hi Matthias, the issue here may be that there might be be software not being able to read aloud PDF/UA documents properly.
I have no idea whether that is enough for vision-impaired people. It might be that there are screen readers available that do a perfect job. At some point I will need to produce documents that are accessible. For that my documents will have to pass a test (to which I don’t have access before submitting the document…). I have no idea whether “passing the test” means that the document is usable for someone with vision impairment. Of course I would like that to be the case, too, but my abilities to test for any of that are limited.
A perfectly opaque process, the one you mention for accesibility testing. Far from ideal (to say the least).
I tried the first page from https://www.recht.bund.de/bgbl/1/2025/104/regelungstext.pdf?__blob=publicationFile&v=3.
It passes Acrobat’s accessibility check, hovering over the image produces the alternate text, letting Acrobat read the document ignores the Bundesadler.
Sorry, I understood the opposite, namely Acrobat read aloud the alternate text for the image (https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/K5EHLCFPVSOI...). The PDF document should be the same as then, so what is different now? As for other software, I’m totally ignorant. As far as the PDF/UA is ok, this is fine for me. This isn’t that I do not care, but something more complex.
I am having similar issues with having formulas read on the Mac. I can see the XML attachments in Acrobat, but what Acrobat or Preview do with them is horrendous.
PDF/UA-1 or PDF/UA-2? Maybe in PDF/UA-2 alternate text is chosen above MathML by the screen reader.
And as for my final comment about the “only benefit”: It seems to me that the two programs I tried on the Mac are bringing no benefit to the vision-impaired. That’s said, but nothing ConTeXt can help with. It just makes everything more complicated, because I have no means of telling whether what I am trying to do to make documents accessible is effective in any way.
I think there are ways. As for your Preview and VoiceOver, users can request (and even demand) from Apple to comply with the EU Accessibility Directive. If that doesn’t work, users can also inform their national authority (or even the Commission) about non-compliant programs. Of course, first you have to be sure that the programs have issues with documents (other than the ones generated by ConTeXt; the recent ones from the »Bundesgesetzblatt« would be fine in Germany). Then, there should be a relatively detailed list of glitches in accessibility. Of course, this is my opinion. And I agree, it‘s a hassle. But I think it may be the only way to get it in some cases (companies not caring enough to comply). Just in case it might help, Pablo

Am Tue, 29 Apr 2025 13:13:39 -0400 schrieb Matthias Weber:
Dear All,
I am starting a new thread as requested.
I can confirm that
the following should work with current latest (from yesterday, LuaMetaTeX 2.11.07 20250427 + ConTeXt LMTX 2025.04.28 14:29):
\enabledirectives [backend.usetags=testing] \setuptagging[state=start] \setupstructure[state=start] \setupbackend [format=PDF/A-3a] \setupbackend[format=pdf/ua-1] \setupexternalfigures[location=default] \starttext \externalfigure[hacker][label={this is an image}]
\startparagraph a \stopparagraph \stoptext
produces a PDF that passes the accessibility check in the current Adobe Acrobat. In particular, it passes the alternate text checks. Hovering over the image shows the alternate text in Acrobat. However, VoiceOver (on the Mac) does not read the alternate text;
The pdf produced by context maps every structure to NonStruct, that means there is no tagging structure, it only fools the accessibility check. You can and should not claim that this an ua-1 file. You can check the structure by uploading your pdf to https://texlive.net/showtags, that will produce an xml from the structure. I don't know if the missing structure is the reason that VoiceOver fails, as I'm on windows, but you could try with a LaTeX document. Go to https://texlive.net/ngpdf and compile there this example: \DocumentMetadata{tagging=on} \documentclass{article} \usepackage{graphicx} \begin{document} some text \includegraphics[alt=an image with a duck]{example-image-duck} \end{document} After the compilation you can download the pdf and compare the reading. I made a fast check with Adobe + NVDA: it reads the actual text of your image, but it doesn't announce that there is graphic. So for the context file you get simply this is an image while the LaTeX file is read as graphic an image with a duck. -- Ulrike Fischer http://www.troubleshooting-tex.de/

Am 30.04.2025 um 00:50 schrieb Ulrike Fischer:
Am Tue, 29 Apr 2025 13:13:39 -0400 schrieb Matthias Weber:
Dear All,
I am starting a new thread as requested.
I can confirm that
the following should work with current latest (from yesterday, LuaMetaTeX 2.11.07 20250427 + ConTeXt LMTX 2025.04.28 14:29):
\enabledirectives [backend.usetags=testing] \setuptagging[state=start] \setupstructure[state=start] \setupbackend [format=PDF/A-3a] \setupbackend[format=pdf/ua-1] \setupexternalfigures[location=default] \starttext \externalfigure[hacker][label={this is an image}]
\startparagraph a \stopparagraph \stoptext
produces a PDF that passes the accessibility check in the current Adobe Acrobat. In particular, it passes the alternate text checks. Hovering over the image shows the alternate text in Acrobat. However, VoiceOver (on the Mac) does not read the alternate text;
The pdf produced by context maps every structure to NonStruct, that means there is no tagging structure, it only fools the accessibility check. You can and should not claim that this an ua-1 file. You can check the structure by uploading your pdf to https://texlive.net/showtags, that will produce an xml from the structure.
I don't know if the missing structure is the reason that VoiceOver fails, as I'm on windows, but you could try with a LaTeX document. Go to https://texlive.net/ngpdf and compile there this example:
\DocumentMetadata{tagging=on} \documentclass{article} \usepackage{graphicx} \begin{document} some text
\includegraphics[alt=an image with a duck]{example-image-duck} \end{document}
After the compilation you can download the pdf and compare the reading.
I made a fast check with Adobe + NVDA: it reads the actual text of your image, but it doesn't announce that there is graphic. So for the context file you get simply
this is an image
while the LaTeX file is read as
graphic an image with a duck.
Hi Ulrike, you should try the ConTeXt example with the attached tag name mapping Pablo sent to the list a while ago. Wolfgang

On 4/30/25 00:50, Ulrike Fischer wrote:
The pdf produced by context maps every structure to NonStruct, that means there is no tagging structure, it only fools the accessibility check. You can and should not claim that this an ua-1 file. You can check the structure by uploading your pdf to https://texlive.net/showtags, that will produce an xml from the structure.
Many thanks for your reply, Ulrike. This is an already known issue. The compilation requires https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/message/YEWPKPJSPTGL.... Many thanks for both url references. They are really helpful.
I don't know if the missing structure is the reason that VoiceOver fails, as I'm on windows, but you could try with a LaTeX document. Go to https://texlive.net/ngpdf and compile there this example:
\DocumentMetadata{tagging=on} \documentclass{article} \usepackage{graphicx} \begin{document} some text
\includegraphics[alt=an image with a duck]{example-image-duck} \end{document}
Weird. Validating the output against veraPDF-1.29.39, it only checks PDF/A-1b (not PDF/UA-2).
After the compilation you can download the pdf and compare the reading.
Matthias, do your programs read aloud the LaTeX document suggested by Ulrike. Many thanks to both of you, Pablo

Am Wed, 30 Apr 2025 18:06:04 +0200 schrieb Pablo Rodriguez via ntg-context:
Weird. Validating the output against veraPDF-1.29.39, it only checks PDF/A-1b (not PDF/UA-2).
verapdf started as a PDF/A validator, and generally if both standards are present it check A. You can use verapdf -f ua1 to force UA validation. Use verapdf --help for more options. -- Ulrike Fischer http://www.troubleshooting-tex.de/

On 5/1/25 11:25, Ulrike Fischer wrote:
Am Wed, 30 Apr 2025 18:06:04 +0200 schrieb Pablo Rodriguez via ntg-context: [...] verapdf started as a PDF/A validator, and generally if both standards are present it check A.
Many thanks for your reply, Ulrike.
You can use verapdf -f ua1 to force UA validation. Use verapdf --help for more options.
Well, I prefer the GUI and I had set it to validate both versions of PDF/UA (having different results). But that was just a comment, my main point was whether /Figure had a right /Alt value. Many thanks your help, Pablo
participants (4)
-
Matthias Weber
-
Pablo Rodriguez
-
Ulrike Fischer
-
Wolfgang Schuster