Skip to main content

Accessibility

An accessibility claim makes the PDF readable by screen readers and other assistive technology: the document is tagged with its logical structure, and the facts only you know (its title, its language, what each picture shows) are written where a reader looks for them. Most of the structure comes from what you already wrote. This page lists the claims, what they write, and the keys you set.

How claims are declared, combined and withheld in general is on Conformance.

The claims​

Accessibility claims sit in metadata.conformance.pdf, beside the PDF/A claim:

ValueStandardWritten asStands beside
ua-1PDF/UA-1 (ISO 14289-1)PDF 1.7a-2*, a-3* (the default a-2b included)
ua-2PDF/UA-2 (ISO 14289-2)PDF 2.0a-4 (what the archival default becomes on 2.0)
wtpdf-accessibilityWell-Tagged PDF 1.0, accessibility levelPDF 2.0a-4, ua-2, wtpdf-reuse
wtpdf-reuseWell-Tagged PDF 1.0, reuse levelPDF 2.0a-4, ua-2, wtpdf-accessibility
  • A Well-Tagged PDF level implies ua-2, so ["wtpdf-accessibility"] is also claimed as PDF/UA-2. The two levels are cumulative and can be claimed together; they are written into the file's metadata as PDF Declarations.
  • One PDF/UA part at a time: ua-1 beside ua-2 is refused, and so is ua-1 beside a WTPDF level.
  • The 1.7 and 2.0 sides do not mix: ua-1 beside a-4, or ua-2 beside a-2b, is refused, and a claim against a pdfVersion pin (ua-1 with "2.0", ua-2 with "1.7") is refused too.
  • Without a pin, ua-2 or a WTPDF level makes the output PDF 2.0, and the archival default follows to PDF/A-4.
{
"document": {
"metadata": {
"title": "Passenger notice PN-19",
"lang": "en",
"conformance": { "pdf": ["a-4", "ua-2"] }
},
"content": [
{ "h1": "Conditions of carriage" },
{ "p": "Tickets are valid on the day of issue." }
]
}
}

Tagging is on request​

A document is tagged only when a claim asks for it: ua-1, ua-2, a WTPDF level, or a PDF/A level A claim (a-2a, a-3a). Nothing is tagged by default, since a structure tree is a large share of a tagged file's size. A level A claim tags the document without making it a PDF/UA claim, so the schema does not require the author keys below for it; set them all the same, since a tagged file is only as readable as what it says.

What tagging writes for you​

Under a claim the structure comes from the content as written, with no extra key:

You wroteIt is tagged as
h1 to h6headings of that level
pa paragraph
ol, ula list, with its numbering style
tablea table, with header cells and their scope, spans, and its caption
image, svga figure, with its alt (or title/desc) and its caption
toca table of contents, each entry a link to its heading
columnsdivisions of one flow, read column after column
use with asa fragment, quotation, aside or article (see Included content)
[latex]a formula (see Formulas)
a linka link, described by the text it is written on
a barcodea figure described by its symbology and payload
a form fielda form element announced by its label
a signature fielda form element described by who signed and why (signedBy, reason)

And some things are marked as artifacts, page furniture a reader skips: headers and footers (the bands), watermarks, leader dots in a table of contents, and a table header row repeated on a continuation page. Nothing a band or a watermark holds is a tagged figure, heading or field, so none of it needs an alt or a label.

The rest is written for you too: the page labels, the title shown in the reader's title bar (DisplayDocTitle), the PDF/UA identification in the metadata, and, in an encrypted document, the permission that lets assistive technology read the text, which is always granted.

What you supply​

Some facts only the author holds. Each has a key.

Required by the schema​

Under ua-1, ua-2 or a WTPDF level, the schema requires these. An editor flags a missing one while you write, and the API refuses the definition with a validation error that names the key, before anything is rendered or billed:

KeyWhat it is for
metadata.title, holding more than white spacea reader announces the title, not the file name
metadata.lang, a language tag such as "en", "fr-CA" or "de-DE"a screen reader pronounces the text in this language
alt on every image node, holding more than white space, or emptywhat a listener hears in place of the picture; empty marks it decorative
title or desc on every svg, holding more than white spacethe same, for a drawing

The alt is required on the image node itself, even one whose src names an image declared in document.images with an alt of its own. An empty one is a statement, not an omission: the picture is decorative, as alt="" says on the web, and it is drawn as an artifact a reader passes over (ISO 14289-1 7.3). Only an inline image, [image, key] inside text, takes its description from document.images.<key>.alt, so an image placed inline is declared there with one.

Language​

metadata.lang is the document's language. Where a block is in another language, give it its own lang; where a few words inside a sentence are, wrap them in [lang, xx]…[/lang]. A reader switches voice at each.

{
"document": {
"metadata": { "title": "Passenger notice", "lang": "en", "conformance": { "pdf": ["ua-2"] } },
"content": [
{ "p": "A [lang, fr]tarif réduit[/lang] applies to children under twelve." },
{ "p": "Les enfants de moins de douze ans voyagent à tarif réduit.", "lang": "fr" }
]
}
}

Abbreviations​

[abbr, expansion]…[/abbr] gives a reader the words an abbreviation stands for, so it is announced in full: [abbr, Value Added Tax]VAT[/abbr]. The page shows the abbreviation as written.

Title and headings​

  • The title node is the document's title as drawn on the page. It is tagged Title, never a heading: it stays out of the bookmarks, the table of contents and the heading levels. Use it for the cover line, and start the sections with h1.
  • Headings h1 to h6 are the outline a reader navigates by. Under ua-1 the first heading is an h1 and no level is skipped on the way down (an h3 straight after an h1 withholds the claim; see below). PDF/UA-2 drops that rule, but a skipped level still leaves a listener a gap.
  • A heading with outline: false stays out of the bookmarks and the table of contents; it is still a heading to a reader.

Tables​

KeyTakesDefaultWhat it does
tha header cellannounced as the header of its column or row; a data cell is td. A th with no text withholds the claim: an empty cell is a td
captiontext (markup allowed)noneannounced with the table, and tagged as its Caption
captionSide (style key)top, bottomtopwhere the caption is drawn; under a table that breaks, a bottom caption is drawn once, under the last row
roledata, presentationdatapresentation is for a layout grid, such as a form laid out in cells: its cells are read in order and no table is announced
{
"table": {
"caption": "Fare schedule",
"rows": [
[{ "th": "Ticket" }, { "th": "Price" }],
[{ "td": "Adult" }, { "td": "12.00" }],
[{ "td": "Child" }, { "td": "6.00" }]
]
}
}

caption and captionSide work the same way on an image and an svg, where the caption is tagged as the figure's.

Included content​

A component placed with use is simply part of the document. as says what it is when it is something else, and tags it so:

asUse it for
fragmentpart of another document, such as an extract from a standard
quotea quotation
asidea note set apart from the main text
articlea self-contained piece, such as one notice in a bulletin
{ "use": { "name": "bridge-standard-extract", "as": "fragment" } }

Images and drawings​

alt says what a picture shows, and an svg's title names a drawing while desc describes it at more length. Say what matters on the page: "Route map from the harbour to the airport", not "image" or "figure 1".

Form fields​

A form field's label is drawn before the control and announced as its name. Without one, the field's own name is announced, the claim stands, and a notice names the field: write a label for words a person would say.

{ "field": { "name": "booking", "label": "Booking reference", "width": 160 } }

Attachments​

An attachment's description is what a reader is told about the file. PDF/UA-2 requires a description on every embedded file; without one the file name is written in its place and a notice says so.

Formulas​

A [latex] formula is tagged Formula, described by its mathematics in linear notation. On PDF 2.0 the formula's presentation MathML is also attached to it, for assistive technology and reuse. A construct MathML cannot carry withholds a ua-2 claim, and the render names the formula.

Viewer preferences​

Under any PDF/UA claim a reader's title bar shows the document's title. metadata.viewerPreferences.displayDocTitle is true whenever the document has a title; setting it to false beside a PDF/UA claim is refused.

Refused under a claim​

These combinations are refused before rendering, with a message that names the key and the clause:

UnderRefusedInstead
any PDF/UA or WTPDF claimviewerPreferences.displayDocTitle: falseleave it out
ua-2, wtpdf-*outlines (an authored bookmark tree)headings with a toc whose outlines is true make the bookmarks; every destination in a PDF/UA-2 file names an element, and an authored bookmark names a page
ua-1encryption.encryptionType: "aes256Gcm"aes256: AES-GCM needs PDF 2.0, which PDF/UA-1 cannot be claimed on
ua-1pdfVersion: "2.0", a-4, a WTPDF levelua-2 for PDF 2.0
ua-2, wtpdf-*pdfVersion: "1.7", a-2*, a-3*ua-1 for PDF 1.7

Withheld at render​

Some faults only show once the document is laid out. Then the document is still delivered, without the accessibility claim; the response's errorCodes carries CONFORMANCE_WITHHELD, and the render's diagnostics give the reason, the clause and the key to change:

The render findsFix
under ua-1, a first heading that is not an h1, or a skipped level (an h3 follows an h1)renumber the headings so no level is skipped
a th with no textgive it text, or make it a td
under ua-2, a formula whose construct presentation MathML cannot carryrewrite the formula

A missing title, language or description never gets this far: the schema refuses it first.

What the schema cannot check​

  • Content order is reading order: write the document in the order it should be read.
  • Meaning is never carried by colour or position alone.
  • Alternate text, captions, labels and link text say something; "click here" and "figure 1" describe nothing.

In a DOCX​

These claims are PDF claims; the DOCX has no tagging to claim. Word reads a document's structure from its own markup: headings keep their outline level, an image's alt is written as the picture's description, an svg's title as the drawing's title, and the language of each paragraph is written. An abbreviation's expansion is not carried and is reported. See Output formats.