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.Example: Accessible Report
bookmark props create a navigable outline, headers/footers are auto-tagged as artifacts, and the image has descriptive alt text.