WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: PDF with very complex headers

for

Number of posts in this thread: 3 (In chronological order)

From: Alan Zaitchik
Date: Thu, Oct 31 2019 12:38PM
Subject: PDF with very complex headers
No previous message | Next message →

I am working on a PDF table with a rather complex set of column headers and
row headers. (I cannot significantly alter the table structure.) For
example, there are 3 rows of headers at the top, where the column
headers in row 1 have a colpan of 2 or 3, and the column headers in row 2
have colspans of 2 or 1. Thus a hierarchy of categories and subcategories
is generated as a set of column headers for all the data cells in the
table.
There are also row headers in columns 1 and 2 of the table, where the
column 1 row headers often have a rowspan of 3 or 4 since they "apply to"
several rows.
Quite a mess of merged cells that reflects a complicated data structure.

I have laboriously defined IDs for all the header cells and even more
laboriously created Header Arrays for all the "child" header cells and all
the data cells. Yet I find no screen reader able to handle this and
correctly announce all relevant headers for a cell. JAWS, NVDA, VoiceOver
-- they all manage to announce one header, but not all the headers in a
cell's Headers Array.
Is there no reliable support for this sort of arrangement of headers? Is
there some effective limit on how "deep" headers can be layered? Or how
complex the mix of row and column headers can be? It's possible, of course,
that I have an error in the markup, but it certainly *looks ok* in the
Acrrbat Table editor and the in PAC3 screen reader preview..

Since the PDF will ultimately be generated programmatically, not through
manual editing, I am considering asking the developers to artifact some
header cells and instead inject relevant text into the child header cells
as ALT text. I hope that would cause the screen reader to announce the same
information as would have been announced had the artifacted parent header
cell and the child header cell both been read aloud. For example, where the
artifacted TH had text like "Category A", and the child TH had text line
"Subcategory A1", I would cause the child TH to have ALT text "Category A
Subcategory A1". The hope would be that the screen reader would announce
the child TH's ALT text when the user moves into a TD controlled by that
TH. The user would get the info that the user needs in this way.

But so far I have not been able to get any screen reader to do so--
although I am not sure why, Before I sink another long day trying to code
and test this I would like to know if anyone has done this or has some
better approach to recommend. All suggestions welcome -- except for "Tell
the designers to refactor the tables".

Alan

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

From: David Engebretson Jr.
Date: Thu, Oct 31 2019 5:55PM
Subject: Re: PDF with very complex headers
← Previous message | Next message →

If you need a screen reader to access a table like that, the only thing to
do is "tell the designers to refactor the tables", at least tell them to
break the tables into smaller tables, and tell the designers how to learn
about WCAG design principles. It's not too hard to keep things simple but it
is really important.

Best,
David



From: Moore,Michael (Accessibility) (HHSC)
Date: Fri, Nov 01 2019 7:46AM
Subject: Re: PDF with very complex headers
← Previous message | No next message

Hi Alan,

You wrote: "I am working on a PDF table with a rather complex set of column headers and row headers. (I cannot significantly alter the table structure.) For example, there are 3 rows of headers at the top, where the column headers in row 1 have a colpan of 2 or 3, and the column headers in row 2 have colspans of 2 or 1. Thus a hierarchy of categories and subcategories is generated as a set of column headers for all the data cells in the table.
There are also row headers in columns 1 and 2 of the table, where the column
1 row headers often have a rowspan of 3 or 4 since they "apply to"
several rows.
Quite a mess of merged cells that reflects a complicated data structure."

I agree that keeping tables simple is the best approach but also know that most of us operate in an advisory capacity. With that in mind We created on how to mark up the cell tag properties to make the spans work. Usually you can't do this with the table editor. The zipped version linked below includes before and after files that were using in the tutorial. We have tested this method with JAWS 2019 and Adobe Reader DC on some pretty complex tables with good results.

For folks using plain text here is the URL: https://accessibility.hhs.texas.gov/docs/processes/ComplexTables.zip

Related tutorials are available on our training page: https://accessibility.hhs.texas.gov/training.htm

Mike Moore
EIR (Electronic Information Resources) Accessibility Supervisor
Texas Health and Human Services Commission
Civil Rights Office