WCAG best practices - print templates (low-code)

Free tools allowing verification of print accessibility

PAC

PAC - https://pac.pdf-accessibility.org/en (Windows) - a tool used to check whether PDF files comply with accessibility requirements. Using it you can verify whether your 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; therefore the results of its reports and analyses are not the only ones to fully rely on, as they do not constitute the only available tool of this type, and other solutions may offer information and analyses that may differ to some extent.

Illustration 1. PAC main panel

Illustration 2. HTML structure tree of the document

Illustration 3. Preview of the document's HTML structure

Axes4

Axes4 - https://check.axes4.com/en/ - an online tool that generates an accessibility report. It is limited compared to PAC regarding more detailed analysis with indication of errors and lacks the ability to preview the PDF structure.

Illustration 4. Accessibility report

Screen readers

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 of a declaration:

Assigning the correct tag to email addresses and links

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

field is sufficient.

Modifying element roles

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

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

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

Example usage for a header:

There is also the possibility of "wrapping" content that we would like to skip in the PDF structure using the element <fo:wrapper> with the role "artifact" assigned.

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

Presentation of empty cells

To create elements that do not need to present values and may be empty, non-breaking spaces or characters in the same color as the print background should not be used.

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

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

Spacing between elements - avoiding empty rows

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

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

For example:

Accessibility in PDF (article on the Consdata blog)

Accessibility in PDF - documents without barriers

Last updated

Was this helpful?