Jump to content
Rollo62

EU Accessibility Act (EAA) / BFSR BarrierefreiheitsGesetz - Generate PDF/UA from HTML

Recommended Posts

Posted (edited)

Hi there,

I’d like to ask if anyone here has experience working with A11y (accessibility):
https://www.bmas.de/DE/Service/Gesetze-und-Gesetzesvorhaben/barrierefreiheitsstaerkungsgesetz.html
https://commission.europa.eu/strategy-and-policy/policies/justice-and-fundamental-rights/disability/union-equality-strategy-rights-persons-disabilities-2021-2030/european-accessibility-act_en
 

This also concerns PDF files, such as data sheets, catalogs, EU declarations of conformity, and so on.
PDFs are not accessible by default; there is PDF/UA for that, and PAC is a good testing tool.
https://pac.pdf-accessibility.org
 

I’m specifically facing the issue that I generate pages in HTML and then convert them to PDF.
However, the PDF/UA-relevant entries are often lost during this conversion.
 

Has anyone experienced similar problems with HTML-to-PDF conversion? Maybe there are good tips and/or tools for this process?

Yes, I could generate PDFs directly with Delphi, but that would require a complete overhaul in so many places that I’m hoping it can also work with HTML.


I’ve also cross-posted this in the DE-DelphiPraxis.
https://www.delphipraxis.net/217301-bfsr-barrierefreiheitsges-eu-accessibility-act-eaa-pdf-ua-aus-html-generieren.html#post1549264

Edited by Rollo62

Share this post


Link to post
Posted (edited)

I've just tested some documents my app generates, and they are all rated as Taygetos+.

Everything has to be compliant in just 3 weeks, great, thank you @Rollo62.

 

 

Edited by Attila Kovacs
  • Like 1

Share this post


Link to post
Posted (edited)
20 hours ago, Attila Kovacs said:

I've just tested some documents my app generates, and they are all rated as Taygetos+.

Everything has to be compliant in just 3 weeks, great, thank you @Rollo62.

Then see German DP, perhaps this is interesting for you too
 

Quote

The PDFix Lite also works after installation, is a QT project, and even seems to fix all problems automatically.
https://pdfix.net/pricing/
The desktop version is no longer free, but if the fix works properly it's probably worth the money.
I'm currently still checking what the output is like.


PDFix Lite can also break with some PDFs, but it produces much better results and can also fix very complex PDFs.
Unfortunately, I don't currently have the ultimate test tool, partly because I don't use Adobe products myself,
there is either something from Adobe or plugins.

 

Edited by Rollo62
  • Thanks 1

Share this post


Link to post

Well, I really wouldn't like to add a post-processor behind it, it's basically impossible for it to work properly when, say, the company logo is made up of 40 paths and scribbles.

Besides, it can't modify a signed PDF anyway.

However, in my form designer, I can add accessibility semantics to the elements, like role, display name, language, etc. and with "gdicomment()", I can pass it to Gnostice, which I’ll expand with a processor and a structure-tree generator.

I think I’m going to miss the 3-week deadline, but I believe this is the only sensible solution.

 

Share this post


Link to post

Sure, but this may help a lot to find out whats possibly going wrong, this usual PDF readers shows no hint at all.
Something has to check the output PDF somehow.

Share this post


Link to post

Well, it's not that complicated. Imagine, for example, that there's a logo in a document and a screen reader application needs to help someone understand what's on the screen. Without tags, the screen reader will start reading things like 'line, line, path, rectangle, etc.' But if you tag the group of shapes/lines as /S /Figure /T (Logo), then it simply reads 'Logo.' The same principle applies to pretty much everything else in the document.

 

Here is an example from the PAC you linked, after I added the /Figure tag using PDF-XChange:

image.png.fe005ab18a0b29f29500d26584eb681c.png

 

Now, PDFix will try to tag everything, more or less quite well, but the tags won’t have names to be read, and the graphics won’t be grouped correctly, etc.

But I did not check PDFix for the details, maybe you can create templates for better results.

 

It's a pretty neat topic, it reminds me of the Lynx, the console text web browser for Linux back in the days.

 

Share this post


Link to post

Yes, I'm checking on different levels howto get those tags added, my hope is that simple conversion or PDF-Printers to the job and accept those tags from HTML.
If not, then the approach to fiddle with the PDF tags itselfs, but imagine a very large document with 27 languages and 6500 issues found ...
My goal is to bring these documents to 0 Issues, when tested by those tools.
I'm not sure if that ever can be done automatically, like PDFix does, at least it can reduce those issues.

Other ways are maybe, for me the best would be HTML-to-PDF conversion/printing or the like, which reflects the aria-elements and others into the PDF,
which seems to be ignored by the tools I checked so far.
Other options to rework by Pythons tools seems to be the most promising solution so far.
Or fixing directly in InDesign, e.g. bei plugins doing automatic fixing somehow.
The question is what are the least painful processes, if you have many older documents with each about thousands of issues?
To rework them manually is really not the most effective way, but perhaps the neccessary if we don't find better solutions.
 

Share this post


Link to post
On 6/7/2025 at 10:39 PM, Attila Kovacs said:

Without tags, the screen reader will start reading things like 'line, line, path, rectangle, etc.' 

Even worse than that, I ask myself what happens with internationalizations?
We have PDF with 27 languages in one file.

How is internationalization regulated there, are there certain regulations and best practices?
What I mean is, for example, an alternative text for images, for screen readers.

https://www.w3.org/TR/WCAG20-TECHS/PDF1.html

We sometimes have documents in 27 languages, usually with one image per language, which could be tagged internationally, which is an enourmous workload.
However, there are always many images that apply directly to many languages, in the worst case for 27 languages, what measures should the alternative texts and tags be given there?
It makes no sense at all to put 27 translations in one tag.
Alternatively, it would be conceivable to only ever add EN as a fallback, but this would also contradict the fact that all documents should be available in all national languages in each EU country.
Such EN fallback would not be OK according to WCAG 3.1.2 or EN 301 549.

How could such cases be handled sensibly?

Yes, the right answer is, re-structure the whole document, which also would blow up the size tremendously.
Since the files are also for printed user manuals, it would mean we have to have much more size and paper waste.

No matter what you do, you cannot meet all the EU regulations, because they were highly contradicing in so many single topics,
best method, close your eyes and wait until you get sued :classic_biggrin:
Of course, the more you try to regulate, the more it gets into over-complexity and finally the opposite of the original intention.

At least HTML has maybe solutions to that, even though not very easy to use:
 

<picture><source srcset="banner-de.svg" lang="de"><img alt="Standort Berlin"></picture>

or you denfine, thats its a language neutral role, which would work in the least of all cases, IMHO.

html <img src="check.svg" alt="" role="presentation">


My conclusion:
You cannnot meet all requirements: A11y, L18n, EcoDesign( saving Paper), EUDR (do not de-forest), GPSR, User manual design (warning icons), etc. etc., but
you can freely choose which regulation you would like to violate the most:classic_biggrin:

 

Are there any other fresh ideas about these topics?  I cannot believe that we are the only ones looking into this mess.
 

 

Edited by Rollo62

Share this post


Link to post
1 hour ago, Rollo62 said:

Are there any other fresh ideas about these topics?  I cannot believe that we are the only ones looking into this mess.

I'm almost finished (I had some time in the evenings during my trip to Sardinia), and I would suggest making that image an 'Artifact' in your case, that would make the readers completely ignoring it.

 

Share this post


Link to post
41 minutes ago, Attila Kovacs said:

I'm almost finished (I had some time in the evenings during my trip to Sardinia), and I would suggest making that image an 'Artifact' in your case, that would make the readers completely ignoring it.

 

But thats not always what it is.
It may be a signal word, it may be a warning sign, which is crucial to the user in user manuals.
https://www.kothes.com/en/blog/creating-safety-and-warning-notices-with-the-safe-method

image.thumb.png.b1ab8ea96d31bf1d365876fe6e23e20a.png

image.thumb.png.96b38b3340352dca17524196467c52d1.png

 

Ok, those can be maybe set in their local language, but sometimes these icons were not repeated in each language.
Thats hard to keep on track, if you have 8000 of those entries in hundrets of files.
Our artwork department will be working on that alone for half a year, updating the current/older documents.  :classic_biggrin:

I think the best way is to keep as-is and to provide a second channel of those documents, e.g. by HTML, where it will be possible to somehow auto-translate and fill those elements.
 

 

Edited by Rollo62

Share this post


Link to post
17 minutes ago, Rollo62 said:

Thats hard to keep on track, if you have 8000 of those entries in hundrets of files.

I told ya I can't imagine how this automated tool should work on this probem, this is a real PITA go get it right.

Share this post


Link to post
8 minutes ago, Attila Kovacs said:

I told ya I can't imagine how this automated tool should work on this probem, this is a real PITA go get it right.

I could think of maybe parsing and replacing somehow, or edit manually at least in an easier editing system than InDesign.
Im not an InDesign user, but my impression is that using InDesign as-is is a pain-in-the-.... in the first place.
Maybe I'm wrong, but its not something I would love to use on a daily base.

Edited by Rollo62

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×