bithost-gmbh / pdfviewhelpers

TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.
GNU General Public License v3.0
44 stars 19 forks source link

PDF/UA Support #204

Open chriskrj opened 2 years ago

chriskrj commented 2 years ago

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.

maechler commented 2 years ago

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.

MoppieMop commented 2 years ago

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

chriskrj commented 2 years ago

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

maechler commented 2 years ago

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 commented 1 year ago

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!