WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: PDF with very complex headers

for

From: David Engebretson Jr.
Date: Oct 31, 2019 5:55PM


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



-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Alan
Zaitchik
Sent: Thursday, October 31, 2019 11:38 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [WebAIM] PDF with very complex headers

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_campai
gn=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_campai
gn=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
http://webaim.org/discussion/archives