pdfviewhelpers icon indicating copy to clipboard operation
pdfviewhelpers copied to clipboard

PDF/UA Support

Open chriskrj opened this issue 2 years ago • 5 comments

Is there any support for PDF/UA? (https://en.wikipedia.org/wiki/PDF/UA) I am interested in accessibility for people with disabilities who use assistive technology such as screen readers.

For that, I need to tag element sections and tables or images with alternative Informations.

chriskrj avatar Jun 27 '22 09:06 chriskrj

I have to admit I am not particular familiar with the PDF/UA standard. We are using TCPDF under the hood, so we can only support it to the extend that TCPDF does it. However I do not know how well it is supported and there seems to be an open question about this as well: https://github.com/tecnickcom/TCPDF/issues/281

I would recommend to quickly test a PDF of yours or from the EXT:pdfviewhelpers or TCPDF examples with an accessibility checker and see how well it works: https://www.access-for-all.ch/en/pdf-accessibility-checker.html

Unfortunately the checker only runs on Windows, else I would have quickly let an example through.

maechler avatar Jun 28 '22 11:06 maechler

I did some research and tweaked the code a little. (See my PR).

But unfortunately i think it is not possible to reach full UA support, because tcpdf does not support tagged content. tcpdf does not keep semantic context. Additionally images does not have an alternative text.

Some more hints to improve accessability

  • Do not use links in your PDF-Template
  • set language with the DocumentViewhelper.

MoppieMop avatar Aug 17 '22 14:08 MoppieMop

Thanks for first Improvements! Maybe TCPDF will implement some Improvements on this Topic.

chriskrj avatar Aug 17 '22 15:08 chriskrj

Thanks for your contributions! I will have a look at it, but it will probably take some time as I need to read up on this topic first. In case you need these changes soon, you have the possibility to extend the affected classes in your own code or use composer patches.

maechler avatar Aug 18 '22 18:08 maechler

I created a new release v2.5.0 with experimental and limited support for PDF/UA as provided by @MoppieMop (https://github.com/bithost-gmbh/pdfviewhelpers/pull/206), thanks!

maechler avatar Jan 15 '23 14:01 maechler