Enabling PDF/UA
AddpdfUa to your Document component. The title prop is required for PDF/UA compliance (it becomes the XMP dc:title metadata):
What Forme Handles Automatically
WhenpdfUa is enabled, Forme generates the required accessibility structures without additional configuration:
- Structure tree — Every element (Text, View, Image, Table, Row, Cell) is tagged with the correct PDF structure role (P, Div, Figure, Table, TR, TD, TH, etc.)
- Marked content — All content streams use marked content operators (BMC/EMC) linking each painted region to its structure element.
- XMP metadata — The
titleandauthorprops on Document are written as XMP metadata withpdfuaid:part=1, which is required by PDF/UA. - MarkInfo dictionary —
/Marked trueis set in the document catalog. - ViewerPreferences —
/DisplayDocTitle trueso PDF viewers show the document title instead of the filename. - Language tag — The document language defaults to English. Override it with the
langprop:<Document pdfUa lang="de">. - Tab order — Each page sets
/Tabs /Sso interactive elements follow the document’s logical reading order. - Artifact tagging — Headers and footers inside
<Fixed>elements are automatically marked as artifacts so screen readers skip them.
Alt Text on Images
Every image in an accessible PDF must have alternative text. Pass thealt prop on Image and Svg components:
If
pdfUa is enabled and an image has no alt prop, Forme will still produce a valid PDF, but the image will be marked as a decorative artifact. Screen readers will skip it. Always provide alt text for meaningful images.Reading Order
Screen readers read the PDF’s structure tree in the order elements appear in your JSX. If your visual layout usesposition: 'absolute' or complex flex ordering, verify that the JSX order matches the intended reading sequence.
Validating with veraPDF
For formal compliance verification, use veraPDF — the industry-standard open-source PDF/UA validator. It checks structure tree completeness, role mappings, alt text, and metadata. Forme runs this validator itself: every commit renders a nine-document corpus (five shipped templates plus four HTML fixtures) and gates CI on all of them passing PDF/UA-1 — the compliance claim is enforced, not assumed.Example: Accessible Report
bookmark props create a navigable outline, headers/footers are auto-tagged as artifacts, and the image has descriptive alt text.
Combining with PDF/A
For documents that need both accessibility and long-term archival compliance, combine both props:PDF/UA-2 (PDF 2.0)
pdfUa2 claims PDF/UA-2 (ISO 14289-2:2024) — the successor standard, defined over PDF 2.0. Use it when your workflow targets modern PDF 2.0 tooling; pdfUa (UA-1) remains the right choice for the widest reader compatibility today.
pdfUa2:
- PDF 2.0 output is implied. Every font must be embedded — PDF 2.0 removes the standard-14 provision, so register
@formepdf/fonts-standard(or your own fonts) or rendering fails with a font-by-name error. - The structure tree uses the PDF 2.0 namespace with a single
Documentroot, and follows ISO 32005’s stricter containment rules (Forme handles this automatically). - Machine-readable graphics carry their data. A
<Barcode>or<QrCode>withoutalttext embeds its encoded payload as the replacement text, so the figure is never silent for assistive technology. Charts and<Canvas>drawings still need an explicitalt. - Internal links and bookmarks become structure destinations — navigation targets the document structure, not just a page position.
pdfUa2 contradicts pdfUa and the 1.7-based pdfa levels (2a…3u); both combinations are refused by name. It composes with pdfa="4" for the modern archival + accessible pair:
verapdf --flavour ua2. Forme’s CI renders its template corpus as pdfa="4" + pdfUa2 and pdfa="4f" + pdfUa2 and gates on veraPDF’s UA-2 profile.