Fixing Table Tags

Fixing Table Tags

We’ve already covered most of the incorrect tags that can show up in your document. Today, we will solely focus on the tags concerning tables and how to fix them. Once again, we recommend learning about the process of Manual tagging and Validation prior to fixing the tags in your pdf.

With your PDF loaded and opened in PDFix, open the Tags panel and run the Validation. We will be using the validation errors combined with a simple examination of the tag tree to reveal existing problems with our tags.

You can watch the linked video for a step-by-step explanation of the entire process.

Table tags structure

In order to recognize a correctly (and incorrectly) tagged table, we first need to get acquainted with the structure of the table tags. Each table is built from TR subtags, which consist of TH and TD cells. One TR subtag groups the tags of one row of the table. The TH subtags represent the cells that make up the table’s header. Similarly, the TD subtags represent the data cells of the table.

Examine the structure of your tables to ensure that the TD and TH cells are accurate with respect to your table, and rearrange them if they are in the wrong order. This can be done using a simple drag and drop. If your header cell is currently tagged as data (or vice versa), retag it by double-clicking on the incorrect tag and selecting the proper one from the drop-down menu.

Table tags structure
A correct tag structure of a table with header cells (orange) and data cells (yellow).

Missing Scope attribute

Once we have ensured the correct structure of our table, we can move on to the missing Scope attribute error. Based on the error description, we can see that the TH cells are missing their scope – an attribute that informs the screen reader of which data cells it should associate with the header.

To add the Scope attribute to the TH tag, you must first navigate to the Tag attributes panel, by pressing the Properties button in the Tags panel. In the tag attributes panel, right-click on TH and select Add Object. Keep the key, change the type to dictionary and choose Standard table attributes as the Object type. After confirming the selection, you can see a newly added dictionary in the Tag attributes.

Missing Scope attribute
Filled in dialog when adding Standard Table Attributes to a TH tag.

Once again, right-click on this dictionary and press Add Object. Now, change the key to scope and select the value as row, column, or both, based on your table. And that’s it! Repeat the process on all TH cells. To make your work easier, you can select multiple TH tags simultaneously and perform the same steps. This adds the same scope attribute to all of the selected tags, so you need to make sure that the value – row, column or both is the same for all selected cells.

Missing Scope attribute
Filled in dialog when adding Scope attribute (row) to a TH tag.

Document tag tree

Even when your Validation passes without errors, we recommend you examine your document’s tag tree to confirm that all of your tables are tagged correctly. For example, our document contains a table currently tagged as a simple paragraph. Here, we can simply delete the incorrect tag and use the manual tagging process to tag the object as a table.

Document tag tree
A table tagged as a text.


Congratulations, you are now left with a correctly tagged PDF!


You might also like