Can a tagged PDF file have a presentation table?

445 Views Asked by At

In HTML, I can have <table role=presentation> which indicates the table isn't a real table and is just used for layout purposes. This helps with screen reader navigation to real tables.

Is there a similar construct for tables in tagged PDF?

As far as I know, the <table> tag in PDF means it's a real table. I couldn't find any properties that would indicate otherwise.

2

There are 2 best solutions below

0
On

Using tables for layout in PDF isn't ideal, but it's not prohibited either. If you want to emulate <table role="presentation">, then simply omit any data table markup, like the use of table headers (<th>), caption tags, summary attributes, or header/ID associations.

This is explained specifically within the context of PDF on the VA.gov section 508 website:

Tables are used in two ways: for layout purposes and to organize and display associated data. The use of layout tables should be limited. Layout tables can cause navigational issues for AT users. Layout tables should not contain data table structure, such as table header (TH) tags, for headers.

https://www.section508.va.gov/support/tutorials/pdf/12tables_1.asp

3
On

Tag names in PDF are completely arbitrary. If you have access to the tags, just convert them to div or section tags. In Acrobat Pro you would do that in the tags panel.

The tags layer is only there for assistive technology, so changing it should not affect the look of the document, or anything else.

I would also check the ordering is ok, which you can do with the tags or ordering panels.

For automatically generated files, I would suggest the question needs to be: How do I layout blocks in a grid? (Rather than how to nullify a table.)