Repository navigation
Description
Document.TextEncodingWarnings already establishes the pattern: the layout engine noticed something
the caller should know about, and reports it through a collection rather than throwing or staying
silent. That mechanism should carry accessibility problems too.
Why at build time rather than at validation
VellumPdf.Conformance validates properly, with an oracle behind it. But it validates a finished file,
and by then the author has lost the context — a report saying "the figure on page 7 has no alternative
text" is less useful than an error at the point the figure was added, where the caller knows what the
figure is.
It also costs nothing: the layout engine already knows a Figure was added without Alt.
Scope
Diagnostics collected during layout for the things the engine can see:
- a
FigureorFormulawith neitherAltnorActualText(§8.2.5.28.2, §8.2.5.29.2) - a table that is not regular, or whose header association is ambiguous (§8.2.5.26 — L11 raises it here)
- a form field with no label and no
/Contents(§8.10.2.3 — L32 raises it here) - content with no language, where the catalog
/Langis absent or empty (§8.4.4) - a heading whose level does not match its evident level (§8.2.5.12)
- a page carrying an annotation with no
/Tabs(§8.9.3.3) - a list with
Lblelements but noListNumbering(§8.2.5.25 — L37)
Each carrying the clause it comes from, so the message is actionable rather than a bare complaint.
And a strict mode
An option where a diagnostic throws rather than accumulating. That lets a CI pipeline require
accessible output without installing veraPDF at all — which matters, because the oracle is a Java
application and a Docker image, and plenty of pipelines will not take that dependency.
Default remains collect-and-report, so nothing existing changes behaviour.
Acceptance
- Each diagnostic above raised on a document that earns it, and not raised on one that does not.
- Strict mode throwing with the clause named.
- A document that produces no diagnostics validates green against veraPDF
ua2— the two agreeing is
the point, and where they disagree ISO 14289-2's text decides: veraPDF is evidence, not the
standard, so the disagreement is recorded rather than resolved by changing a rule to match the tool.
Relates to
- L11, L32, L37 — the issues that raise diagnostics.
- Conformance: PDF/UA-2 (ISO 14289-2:2024) rule set #275 — the rules these anticipate.
TextEncodingWarnings— the existing precedent.
Plan labels used above, resolved: L11 #296 · L32 #300 · L37 #302.
Activity