For the complete documentation index, see llms.txt. This page is also available as Markdown.

WCAG good practices - print templates (low-code)

Free tools for verifying print accessibility

PAC

PAC - https://pac.pdf-accessibility.org/en (Windows) - a tool used to check whether PDF files comply with accessibility requirements. It can be used to verify whether our PDF meets PDF/UA and WCAG standards and generate a report based on that. It also allows previewing the document structure for a screen reader.

It should be noted that PAC is not an official tool created by the ISO committee, but by an external company, so the results of its reports and analyses are not the only ones to rely on completely, because it is not the only available tool of this kind, and other solutions may offer information and analyses that may differ to some extent.

Figure 1. PAC main panel
Figure 2. HTML document structure tree
Figure 3. HTML document structure preview

Axes4

Axes4 - https://check.axes4.com/en/ - an online tool generating an accessibility report. It is limited compared with PAC in terms of more detailed analysis with error indications and there is no possibility to preview the PDF structure.

Figure 4. Accessibility report

Screen readers

The information is located here

Print metadata declarations

In the context of accessibility <fo:declarations> we can declare metadata or other additional information that does not directly affect visual formatting.

Screen readers can interpret these values. According to UA and WCAG assumptions, the metadata should include the application title, language, and the DisplayDocTitle setting. Example declaration:

Assigning the correct tag to email addresses and links

Email addresses and links to external addresses should be included in the context of the tag <fo:basic-link>

Example:

Modifying element roles

By default, elements automatically have corresponding types set in the generated PDF structure. (H1 to H6 for headings, L for lists, etc.). However, it is possible to override the default roles if we want to improve the default structure by using the "role" attribute.

The default <fo:block> has the <p> role assigned.

In order to omit some elements in the PDF structure, so they are not visible to a screen reader, we can use role="artifact". This is useful to skip, for example, elements such as <fo:static-content> such as page headers and footers, which are not useful for blind users when read by a screen reader.

Example use for a header:

There is also the possibility to "wrap" content that we want to omit in the PDF structure using the <fo:wrapper> element with the role set to "artifact".

Example for displaying the date format dd-mm-yyyy under a field:

Displaying empty cells

For creating elements that do not need to present a value and may be empty, a non-breaking space or characters in the same color as the print background should not be used.

Example of a template for an unchecked checkbox causing an accessibility report error due to the use of color="white", which causes a white character to be displayed on a white background:

Instead, it is better to create an empty cell with an assigned style padding-top and padding-bottom, which will visually give us the same appearance of the cell without the need for any unnecessary character inside.

Spacing between elements - avoiding empty rows

A bad practice is to use elements such as fo:block with non-breaking space characters to increase the spacing between elements in the printout. The same effect can be achieved using styles such as margin-top and margin-bottom. This avoids unnecessary empty elements in the document structure.

When you want to increase the spacing between rows <fo:table-row> you can use the table property border-collapse="separate" and border-spacing="...".

For example:

Accessibility in PDF (article on the Consdata blog)

Last updated

Was this helpful?