Wednesday, January 22, 2020

Accessibility checker and support for PDF/UA specs

PDF/UA or ISO 14289 is a specifications that defines the requirements for accessibility in a PDF document. The specification defines the required structure and formatting of the document (also refers to WCAG specification from W3C for use on the web) and PDF features, which should be enabled or disabled so the document is better suited for accessibility (for example PDF tags are required).

Thanks to the Dutch Standardisation Forum for financially sponsoring and Collabora Productivity in cooperation with Nou&Off for the work on implementing this specification into LibreOffice.

Figure 1: PDF Export
The implementation in LibreOffice is currently done only for Writer. It consists of two parts.: First is to enable PDF/UA support into PDF export, which writes a PDF/UA flag into the PDF document and enables all the required features. The PDF export dialog was extended with a checkbox (see figure 1).

Figure 2: Accessibility Check in menu 

The second part is an accessibility check functionality, which traverses the document structure and gather all possible accessibility issues. The accessibility check can be run manually through the menu under Tools - Accessibility Checker (see figure 2), or it will be triggered after PDF export dialog, if the PDF/UA support is enabled. The accessibility issues are presented in a dialog (see figure 3).

Figure 3: Accessibility check dialog

The checks that are (currently) implemented are:

  • Check that the document title is set.
  • Check that the document language is set, or that all styles that are in use, have the language set.
  • Check all images, graphics, OLE objects for the alt (or title in some objects) text.
  • Check tables don't include splits or merges, which aren't allowed by the specifications. The table should be 
  • Check for fake/manual numbering (not using integrated numbering). For example writing "1." "2." "3." at the beginning of the paragraphs.  
  • Check that hyperlink text is not a hyperlink itself - hyperlink should be described. 
  • Check for the contrast between text and the background. The algorithm is described in the WCAG specification.  
  • Check for blinking text, discouraged for the obvious reasons.
  • Check for footnotes and endnotes, which should be avoided.
  • Check for heading order. Order of the headings must increase incrementally with no skips (for example Heading 1 to Heading 3, skipping Heading 2).
  • Check, if text conveys additional meaning with (direct) formatting.

The PDF/UA support will be included in LibreOffice 7.