Back to blog
March 14, 202610 min read

Creating Accessible PDFs: A Guide to Tagged PDF and PDF/UA

How to generate PDFs that work with screen readers. Tagged PDF structure, alt text, reading order, and PDF/UA compliance.

accessibilitytagged-pdfpdf-uascreen-readers

Why accessibility matters

Tagged PDFs contain a logical structure tree that tells screen readers the reading order, heading hierarchy, and role of each element. Without tags, a screen reader just reads the raw text in physical order — which may not match the visual layout at all.

Many organizations are legally required to produce accessible documents (Section 508, ADA, WCAG). Tagged PDF is the standard for accessible PDF output.

Generating tagged PDFs

With pdfRelay, tagged PDF generation is a single option:

const res = await fetch('https://pdfrelay.com/api/v1/convert', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer sk_live_...', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    source: 'html',
    content: html,
    options: { tagged: true },
  }),
});

The Rust engine derives the tag structure automatically from your HTML:

  • <h1>-<h6> → Heading tags (H1-H6)
  • <p> → Paragraph tags
  • <table> → Table structure with headers and data cells
  • <ul>/<ol> → List structure with items
  • <img alt="..."> → Figure tag with alt text

Your HTML structure IS the accessibility structure. No extra markup, no proprietary attributes. Write semantic HTML and you automatically get accessible PDFs.

Ready to try pdfRelay?

Get started free. No credit card required.