WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: VoiceOver and PDF table headers... again

for

From: Steve Green
Date: Aug 30, 2021 5:27PM


Have you tried putting all the header text into a <Span>? If it works for the dagger, perhaps it will work for the whole header. Sometimes you just have to do weird stuff like that to get PDFs to work.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Alan Zaitchik
Sent: 30 August 2021 22:28
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [WebAIM] VoiceOver and PDF table headers... again

I've troubled you all in the past on related issues, but this one really surprised me.
I'm working on a table with terribly complex column headers, without the option of refactoring it into simpler tables. As expected, VO and to a lesser extent NVDA could not digest the "colspanning" and "rowspanning" of the headers. I came up with what I thought was a brilliant workaround: I can flatten the headers into just one row without changing the appearance of the table, if I use "Actual Text" to simply "inject" the parent and ancestor header text into the remaining column header.
Simplified Example: "Average Annual Return" sits atop both "1 year" and "2 year" and "3 year" column headers. Each of these sits above 2 column headers: "As a %" and "Per $1000". What I did was collapse the 3 rows into one by "artifacting" the top 2 rows (the "Average Annual Return" row and the "1 year" and "2 year" and "3 year" row) and assigning as the Actual Text for the 6 remaining column headers (previously row 3, now row 1):
"Average Annual Return, 1 year, as a percent"
"Average Annual Return, 1 year, per $1000"
"Average Annual Return, 2 years, as a percent"
"Average Annual Return, 2 years, per $1000"
"Average Annual Return, 3 years, as a percent"
"Average Annual Return, 3 years, per $1000"
Yes, a little verbose and repetitive, but everything reads out correctly in JAWS and NVDA, as I navigate the table.
The trouble is with VoiceOver. Navigating through the column header row, or navigating through the data rows, VO reads out the visible text in the column header cell ("1 year", "2 years", and "3 years"), ignoring the Actual Text entirely.
Well, not entirely entirely. I added a dagger symbol to one of the column headers, wrapped it in a <Span>, and gave it an Actual Text value of "See important dagger note following table". (Please ignore the barbaric wording.) And Voice Over gladly read it out as "1 year See important dagger note following table". So Voice Over can handle Actual Text replacement in this case.
What Is going on? Does VO do Actual Text replacement for a single character only?
And another question: if I get the above scheme to work well with JAWS and NVDA, and if VO is at least able to read the visible column header text with the data values, would that count as "accessible enough"? (I realize the latter question is contentious….) Alan