How-to · 7 min read
Accessible PDF Tables: Headers, Scope and Complex Tables
A practical guide to accessible PDF tables: TH and TD tags, scope, IDs and headers for complex tables, merged cells, layout tables and how to test them.
An accessible PDF table is tagged as a Table with rows (TR), header cells (TH) and data cells (TD), and each header cell tells assistive technology which direction it applies to through a scope of Column or Row. Simple tables need only that; complex tables with merged or multi-level headers need each data cell linked explicitly to its headers using IDs, or better, should be split into simpler tables. Tables used purely for layout should not be tagged as tables at all.
Why tables are hard for screen reader users
A sighted reader glances at a column heading and a row label to understand a number. A screen reader user hears one cell at a time. Without header information, "42" is just a number.
With proper tagging, a screen reader can announce "Q3, Library visits, 42,000" — the column header, the row header and the value — as the user moves through the table. That is what WCAG success criterion 1.3.1 (Info and Relationships) requires, and PDF/UA requires table headers to be identified correctly.
The table tags
| Tag | Meaning |
|---|---|
Table | The whole table |
THead, TBody, TFoot | Optional groupings of header, body and footer rows |
TR | A table row |
TH | A header cell |
TD | A data cell |
Caption | The table's caption, inside the Table |
A minimal simple table looks like this in the tag tree:
Table
TR
TH (scope: Column) "Branch"
TH (scope: Column) "Visits 2025"
TR
TH (scope: Row) "Central"
TD "340,000"
TR
TH (scope: Row) "Northside"
TD "118,000"
Simple tables: use scope
A simple table has one row of column headers, and optionally one column of row headers. For these:
- Tag the header cells as
TH. - Set Scope to Column for column headers and Row for row headers.
- Tag all other cells as
TD. - Make sure every row has the same number of cells (counting spans).
Strictly, assistive technology can often infer the direction of a header in a simple table, but setting scope removes ambiguity and is expected under PDF/UA-1 for tables where the direction cannot be determined otherwise. Setting it everywhere is good practice.
Complex tables: IDs and headers
A table is complex when a data cell relates to more than one row or column header — for example, a two-level column header ("2025" spanning "Q1" and "Q2"), or headers in the middle of the table.
For these, scope is not enough. Use the ID and Headers method:
- Give each
THa unique ID. - On each
TD, list the IDs of all headers that apply to it.
| Cell | ID | Headers |
|---|---|---|
| "2025" (spans two columns) | h2025 | — |
| "Q1" | hq1 | h2025 |
| "Q2" | hq2 | h2025 |
| "Central" (row header) | hcentral | — |
| Data cell under Q1 for Central | — | h2025 hq1 hcentral |
This is precise, but it is laborious to build and maintain by hand, and support varies between screen readers and PDF viewers.
The better option: simplify
Before tagging a complex table, ask whether it can be:
- Split into several simple tables, each with one header row.
- Restructured so headers repeat in every row instead of spanning.
- Moved to an accessible spreadsheet or HTML table with a summary in the PDF.
Simple tables are easier for everyone to read, not only screen reader users.
Merged and empty cells
- Merged cells: use the
RowSpanandColSpanattributes on the cell, rather than leaving phantom cells. Merged cells in the body of a table often signal a table that should be restructured. - Empty cells: an empty data cell is fine, but tag it as an empty
TDso the row stays aligned. Consider writing "None" or "0" if empty is ambiguous. - Empty header cells: the top-left corner cell is often empty. Tag it as
TD(or as aTHwith appropriate text) rather than a blank header.
Tables that span pages
A table that continues across pages should be one Table element in the tag tree, not one per page. Repeated header rows on later pages are visual; in the tag tree, mark the repeats as artifacts so screen readers do not announce the headers again in the middle of the data.
Layout tables
Some documents use tables to arrange content in columns — a two-column letterhead, a form layout, a newsletter grid. These are not data tables. Tagging them as Table makes screen readers announce rows and columns that mean nothing.
Fix: remove the table structure and tag the content as normal paragraphs, headings and lists in the correct reading order.
Captions and summaries
- If the table has a visible caption or title, tag it as
Captioninside theTable, or as a heading immediately before it. - For complex tables, a short summary in the text before the table ("The table compares visits by branch and quarter for 2024 and 2025") helps everyone orient themselves.
Making tables accessible at source
Word
- Insert tables with Insert > Table, not tabs and spaces.
- Select the first row and turn on "Repeat as header row at the top of each page" (this also marks it as a header row on export).
- Avoid merged and split cells; avoid nested tables.
- Add alt text to the table only if needed; a caption or preceding heading is usually better.
Excel
Exporting a spreadsheet to PDF often produces poor table tags. Define a clear header row, remove blank rows and columns, and check the output carefully. See accessible PDFs from Excel.
InDesign
Designate header rows in Table Options; set cell header scope in export options where available; avoid splitting a single table into separate frames.
Fixing tables in an existing PDF
- Check whether the table is tagged as a
Tableat all. Many are a flat run of paragraphs. - Rebuild the structure:
Table>TR>TH/TD. - Set scope on header cells, or IDs and headers for complex tables.
- Fix spans and remove repeated headers on later pages.
- Read through the table with a screen reader.
Desktop editors offer a table editor for this, but it is one of the slowest parts of manual remediation. Our accessible PDF tables tool detects table structure, tags header cells and sets scope automatically. It works well on simple and moderately complex tables; when it is unsure which cells are headers it flags the table so you can set them in the review editor.
Testing your tables
| Check | How |
|---|---|
Table is tagged as Table | Tag tree or automated checker |
Headers are TH | Tag tree or PDF/UA checker |
| Scope or headers set | Cell properties, checker report |
| Rows have consistent cell counts | Checker (PDF/UA flags irregular tables) |
| Headers announced correctly | Screen reader, moving cell by cell |
| Layout tables removed | Visual review of the tag tree |
The W3C's tables tutorial is written for HTML, but its explanations of simple, irregular and multi-level tables apply equally to PDFs.
Frequently asked questions
What makes a PDF table accessible?
It must be tagged as a table with rows, header cells and data cells, and assistive technology must be able to tell which headers apply to each data cell. For simple tables that means `TH` cells with a Row or Column scope; for complex tables it means ID and headers associations.
What is scope in a PDF table?
Scope is an attribute on a header cell that says whether it is a header for its column, its row, or both. It lets a screen reader announce the right header when a user moves to a data cell.
Should I use scope or IDs and headers?
Use scope for simple tables with one level of row and column headers. Use IDs and headers for complex tables with spanning or multi-level headers. Where possible, simplify complex tables instead, because they are hard for everyone to read.
How do I handle a table that continues on the next page?
Tag it as one table in the structure tree, and mark the repeated header rows on later pages as artifacts. That way screen readers read the data continuously, with header information still available from the original header row.
Do layout tables need to be tagged as tables?
No. Tables used only for visual layout should not be tagged as tables. Their content should be tagged as ordinary paragraphs, headings or lists in the right reading order.