[BlindMath] [accessibility] Latex Table Question

Ross Moore ross.moore at mq.edu.au
Sat May 11 00:14:04 UTC 2024


Hi all,

On 10 May 2024, at 7:30 pm, Alex Watson <alexander.watson at ucl.ac.uk> wrote:


Hi Jonathan/Abdulqadir,

I'm not sure whether he reads this list, but Michal<https://tex.stackexchange.com/users/2891/michal-h21>, who maintains make4ht, is very good at playing with tex4ht/make4ht's guts. He does respond regularly on the TeX stackexchange. If it is a question of creating a custom markup for a simple situation and getting make4ht to accept it, I think this would be much more possible than devising a general solution. It could even be a custom filter since make4ht is very modular like that.

I once mocked up such a solution for lwarp - a macro to mark an individual cell to be turned into a TH element, rather than a TD, in the HTML

This sounds like the right way to go for a quick solution...

- but it was not accepted because the maintainer (very reasonably) did not want to introduce custom markup without an accepted practice that would align with future tagged PDF practices etc. that Ulrike et al are developing.

… since without a fully tagged PDF structure tree, there isn’t any other way to tell when you are in a table cell, header or otherwise, or even the table itself.
It has to be done by whatever software is interpreting the LaTeX source.

Although not a complete solution, most tables will be of the type where the 1st cell in a row is <TH>
and the first non-compounded (using \multicolumn) cell in a column is similarly a <TH>.
Using Booktabs, so that \midrule can be the boundary between <THead> and <TBody>, is certainly a good idea.

Using these ideas, call them heuristics if you like, you can get a long way into producing fully tagged tables,
whether for Tagged PDF or for HTML.

I gave a talk on precisely this topic at TUG 2022:
https://www.youtube.com/watch?v=E1oFa3DbyoE&list=PLLt9mKFAx-FaKzET1DNj-wD-g8YG3_r1m&index=17

Links to example PDFs, and conversions to HTML, can be found at:
http://web.science.mq.edu.au/~ross/TaggedPDF/TUG2022/


Hope this helps.

Ross


Best wishes,

Alex

On 10/05/2024 10:21, Jonathan Fine wrote:

⚠ Caution: External sender

Hi Abdulqadir

This is in response to your query in http://nfbnet.org/pipermail/blindmath_nfbnet.org/2024-May/011055.html<http://nfbnet.org/pipermail/blindmath_nfbnet.org/2024-May/011055.html>

There is prior art from 2022 on this. Or more exacting, in a 2022 discussion the experts knew of no prior art on this. I've copied participants Jason White and Ulrike Fischer on this. I hope they'll give us an update on this.

On 1 April 2022 Jason asked if there was a generally accepted Latex convention for specifying which cells in a table are header cells. Without such a convention creating column headers would be guesswork or ad-hoc document specific markup.
https://tug.org/pipermail/accessibility/2022q2/000186.html<https://tug.org/pipermail/accessibility/2022q2/000186.html>

On 2 April 2022 Ulrike replied that it won't be easy to create better markup conventions that would solve Jason's problem.
https://tug.org/pipermail/accessibility/2022q2/000190.html<https://tug.org/pipermail/accessibility/2022q2/000190.html>

with kind regards

Jonathan



More information about the BlindMath mailing list