PDF Remediation: How to fix tables, Part 1
Sometimes, when we view a PDF table with Acrobat Pro's Table Editor tool, the red/purple lines that delineate the table cells don't align correctly.
Here's one way to correct this problem so that it doesn't throw off screen readers and other assistive technologies.
The problem: Acrobat's Table Editor doesn't identify the cells correctly
When a table doesn’t appear correctly in Acrobat’s Table Editor, the red/blue outlines and shading on the table cells don’t match the actual structure.
Expecting to see something like this:
You may see something more like this:
This error prevents remediators from selecting the <TH> cells to add the required Scope and Span properties to them. It also causes the table to be mis-read by screen readers.
How to correct the problem
Instead of using Acrobat’s Table Editor, edit the <TH> and <TD> tags manually in the Tags Panel.
First, check that each cell in the table is correctly tagged as <TH> or <TD>.
- In Acrobat’s Tags panel, expand the <Table> tag and examine each <TH> and <TD>. Column Headers and Row Headers should have <TH> tags, and the remaining data cells should have <TD> tags.
- Modify any erroneous tag either by right-clicking on it and selecting Properties / Tags / Type, or by simply editing the tag itself.
Next, modify the attributes of each cell’s tag in the Tags panel.
For each <TH> and <TD> cell:
- Right-click the cell and select Properties.
- Click the Edit Attribute Objects button.
- Click the New Item button, which will create /Attribute Object 1 <<Dictionary>>
- Click its + (plus sign) to open it.
- Click the /O /Layout entry to highlight it and click the Change Item button.
- Change Layout to Table and click the OK button.
If the cell is a <TH> cell, set its Scope and Span settings
- Click on /Attribute Object 1 <<Dictionary>> to highlight it and click on the New Item button.
- In the Key: box, type in Scope
- In the Value: box type in either Column or Row, as appropriate, and select Name in the Value Type dropdown. Click OK.
If this <TH> cell spans more than one row and/or column:
- Click on /Attribute Object 1 <<Dictionary>> to highlight it and click on the New Item button.
- In the Key: box, type in either RowSpan or ColSpan as appropriate.
- In the Value: box, type in the appropriate number of cells spanned in that direction, and select Integer in the Value Type dropdown. Click OK.
- If both rows and columns are spanned, repeat steps 1 through 3 for the opposite span.
This method won't clear up your table's appearance in Acrobat's Table Editor, but it should now read correctly with screen readers.
Before publishing the PDF, be sure to test your table with screen readers and other AT (assistive technologies.)
Check this blog for other tutorials on remediating PDFs.
Learn to fish. Save money. Time. Hassle.
Our services help you maximize your technology, streamline your workflow, and seamlessly build accessibility into your digital publications. Our mission is to train and coach you so well that you no longer need us or outside remediation services.
By teaching you how to fish — and make accessible PDFs right out of the box — we hope to work ourselves out of our jobs!
PubCom has a full suite of courses on accessibility topics, as well as traditional desktop publishing, digital media, and website development. We started offering accessibility training to the federal government in 2001 right after Section 508 and WCAG 1.0 went into effect in the US. That was 23+ years ago and we haven't stopped yet!
The takeaway: we know publishing, from editorial to design to distribution (print and digital) — and we're accessibility experts (Bevi Chagnon is a delegate to the ISO committee for PDF accessibility that creates the PDF/UA standard). We share our knowledge and help you learn to fish. Our little fisherman keeps us on our goal.
Drop us a line and let us know how we can help.