Accessibility Wiki

TH cells must sit directly inside a row

PDF/UA check TABLE_HEADER_STRUCTURE · Tables · severity Medium · PDF/UA 8.2.5.26 Table

↩ Back to the rules index · WCAG cross-reference

Why it matters

Headers must be inside rows for the table structure to be valid. Misplaced headers break screen reader navigation and make tables incomprehensible.

What you will see

A TH element has something other than a TR as its direct parent.

How to fix

Move each TH element in the tag tree so it is a direct child of a TR element. If a TH sits directly under Table or another element, create or locate the correct TR row and place the TH inside it.

Step-by-step guide

  1. Open the Accessibility tags panel (View > Show/Hide > Side panels > Accessibility tags) and locate each flagged TH element whose parent is not a TR.
  2. If the TH sits directly under Table, THead, TBody, or TFoot: right-click that parent, choose New Tag > Table Row (TR), and drag the TH (and its sibling cells from the same visual row) into the new TR, preserving left-to-right order.
  3. If the TH is nested too deep (e.g. inside a P, Div, or another cell), drag it up in the tag tree so its immediate parent is the TR that represents its visual row.
  4. If a wrapper element now sits empty between the TR and its former content, delete the empty wrapper tag.
  5. If several cells are misplaced across the table, it is usually faster to rebuild: select the table region with All tools > Prepare for accessibility > Fix reading order (the Reading Order tool), click Table to retag it, then reassign header cells via Table Editor > Table Cell Properties.
  6. Check row order in the tag tree matches the visual top-to-bottom order of the table after moving elements.

Verify: Re-run the EQChecker scan and confirm TABLE_HEADER_STRUCTURE passes. Expanding the table in the Accessibility tags panel should show each TH directly inside a TR.

Note: TH is only ever valid as a child of TR per the containment rules of ISO/TS 32005, which PDF/UA-2 applies through its structure hierarchy requirements; 8.2.5.26 itself defines the table semantics. Its NOTE 5 confirms a TR may contain a mix of TH and TD cells, so moving a TH into a row that also holds TD cells is legitimate for row-header layouts.

WCAG success criteria

1.3.1 Info and Relationships — Level A

Structure and relationships conveyed visually (headings, lists, tables, labels, groups) must also be available programmatically.

Understanding 1.3.1

Standards

This check contributes to the following standards:

PDF/UA WCAG A EN 301 549

Standard Criteria
PDF/UA-2 (ISO 14289-2:2024) 8.2.5.26 Table
EN 301 549 (non-web documents) 10.1.3.1