Adobe Acrobat Accessibility: Table regularity fails, but all the rows have the same number of cells
Copy link to clipboard
Copied
I get files sent to me to make them compliant. Files come from a lot of sources.
The files I am having most issues never have accessibility tags. I talked to the clients and asked them to save or export to PDF so we could have the tags, but they explained that the files are produced through a web application and they do not have control over how the files get converted. These are time sensitive documents with that can have up to 40 pages of untagged content/tables. I rely on the auto tag feature to get these tagged in a timely manner. I then will do an accessibility check and go through the tag tree to fix any errors.
I have noticed lately, last 4 months or so, that sometimes Adobe Acrobat's Accessibility Full Check will flag tables for not being regular. These tables often do not have visible borders so when a cell is empty, the auto tag function will not create an empty cell making the tables irregular. I manually add the empty cell to the table structure in the tag tree to make sure every row has the same amount of cells. I will then recheck the failure, but adobe still flags it as a regularity fail.
I took sometime to troubleshoot the error and added an empty table to the tag tree and moved row by row on to the new table. After moving each row, I checked accessibility to find my problem row. The row had nothing out of the ordinary. Same number of cells as the rest and no funky tags within each cell. I added an empty row tag and the appropriate number of cell tags. I then moved all the content objects into the new empty tags. Deleted the now empty problem row and the failure was cleared.
I understand that in a perfect world, the pdf would have been created with tags from the beginning. But I and my clients do not really have control over that portion of the file.
Like I mentioned, this is a rather recent problem. It is most common on these types of files, but it has also occurred in files that have been converted from word.
I do check the span of the headers and have found nothing out of the ordinary.
Here is one of the tables in question:
3 rows. 3 columns.
After the initial scan this was marked for irregularity because the second and third row only had 2 cells. The column for trend description has no data. So, in the tag tree, I added 1 empty cell to I the middle of each row to make it regular, but it still failed regularity. I am at a loss on what my issue could be. Tag tree for the table:
I have tens of these tables so it is very time consuming to have to “recreate” the tag structure of each table (since I can only add one new empty tag at a time) then move all the objects into the correct space. I’d appreciate any advice.
Copy link to clipboard
Copied
Hope you are doing well. Thanks for writing in!
From what you've described, the main issue seems to be that the Accessibility Checker flags tables as irregular, especially when there are empty cells (like in the "Trend Description" column). This is a common problem when tables are missing accessibility tags or when empty cells aren't recognized properly by the auto-tagging feature.
-
Empty Cells Not Detected Properly: Sometimes Acrobat doesn’t recognize manually added empty cells as valid table elements, and this is likely causing the table to still be flagged as irregular. Adding a "Zero-Width Space" (
\u200b
) or similar invisible characters to the empty cells might help Acrobat see them as valid cells, which could resolve the issue. -
Check for Missing Table Structure: If any part of the table structure is missing or improperly nested (like the
<TR>
or<TD>
tags), Acrobat might flag it as irregular. You should double-check that every row is properly enclosed with the<TR>
tags, and that every cell within the row is enclosed in<TD>
tags—even if the cell is empty. -
Column Spanning: Sometimes, tables have cells that span multiple columns (using
colspan
), and this can mess with the tag structure if it’s not handled properly. If you have any merged cells, make sure thecolspan
is properly represented in the tag tree, or Acrobat might flag the table as irregular. -
Batch Processing to Save Time: Given that this problem occurs across multiple tables, you might want to consider automating parts of the process. For instance, Acrobat’s batch processing tools or JavaScript could help you add the necessary empty cells across multiple tables without needing to manually adjust each one.
-
Rebuilding the Table Tags: You mentioned that manually moving rows and adding empty cells has worked in the past, but it’s very time-consuming. One way to speed up this process is by creating a more systematic approach to rebuild the tag structure for each table in bulk. This might be a tedious task at first, but it could save you significant time in the long run, especially if you encounter similar issues regularly.
Let me know if this helps.
-Souvik
Copy link to clipboard
Copied
Thank you very much for all this info. I found that the column spanning is what is giving me trouble. Autotag is creating some funky column span properties. After chnaging those, the regularity passed. This is a new issue though. This was not the case a few months ago.
I looked into your last 2 bullets (Batch processing and rebuilding table tags) Do you have anymore resources on these subjects? I am using the New Adobe Acrobat and do not see batch processing. While looking into it, I found instructions for "use guided actions" but I am not seeing where I can use this tool to insert the missing cells.
Thank you again for the insight.
Copy link to clipboard
Copied
To run a script on multiple PDFs, you can create a batch process (using Action Wizard) to apply the script to all PDFs in a folder:
- Open Action Wizard from the Tools pane.
- Create a new action, and include the script to run on each file.
- Select the folder containing all the PDFs you need to process.
- Run the batch action, and Acrobat will apply the script to each file.
While I have tried making the scripts compatible with Acrobat, I would request @try67 to kindly review the script and suggest changes as needed.
Thanks,
Souvik
[scripts removed as per suggestion]
Copy link to clipboard
Copied
There's no such thing as getPageTags. This entire code won't work.
Copy link to clipboard
Copied
Thanks!
I removed the scripts to avoid confusion.
-Souvik

