Skip to content

Layout: build-time accessibility diagnostics, with a strict mode #304

Open

Description

@Tim81

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 Figure or Formula with neither Alt nor ActualText (§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 /Lang is 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 Lbl elements but no ListNumbering (§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


Plan labels used above, resolved: L11 #296 · L32 #300 · L37 #302.

Activity

  1. added
    area/conformance
    area/layout
    type/feature
    on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/conformancearea/layouttype/feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions