You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by "siebej (via GitHub)" <gi...@apache.org> on 2026/07/22 15:16:37 UTC
[PR] Add fox:headers extension property for accessibility of complex tables [xmlgraphics-fop]
siebej opened a new pull request, #105:
URL: https://github.com/apache/xmlgraphics-fop/pull/105
PDF/UA requires that table cells reference their header cells. FOP supports the `/Scope` attribute, which covers simple tables, but for complex tables (multi-level or spanned headers) the PDF specification provides the Table `/Headers` attribute, which FOP cannot produce today. Validators such as PAC flag such tables.
This PR adds a `fox:headers` extension attribute on `fo:table-cell`, containing a space-separated list of header-cell ids — deliberately mirroring the HTML `headers` attribute. With accessibility enabled:
* header cells (TH) with an `id` get an `/ID` entry in their structure element;
* cells with `fox:headers` get a Table `/Headers` attribute referencing those ids.
Includes unit tests for the structure tree and an end-to-end test that parses the resulting PDF with PDFBox and verifies the `/ID` and `/Headers` entries.
Note: this PR is stacked on #104 (its first commit); the `/Headers` string values need the attribute-dictionary parent fix from that PR.
We use this in production for Dutch government publications (Staatscourant, Gemeenteblad) which must be PDF/UA compliant.
I don't have an ASF Jira account, so there is no FOP issue number yet — happy to reference one if a committer creates it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org