Skip to content

Missing support for PDF/UA-1 export #82

@SeSodesa

Description

@SeSodesa

Let's take the following Typst document:

#import "@preview/zero:0.6.1"

#set document(
  title: "PDF/UA-1 issues"
)

#title()

#zero.num(0)

#zero.zi.mm(0)

When compiling this with zero:0.6.1, the first line beginning with #zero causes the following error:

error: PDF/UA-1 error: missing alt text
   ┌─ @preview/zero:0.6.1/src/formatting.typ:14:2
   │
14 │   math.equation(sequence(items))
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   │
   = hint: make sure your images and equations have alt text

For the second line, the error is similar but points elsewhere:

error: PDF/UA-1 error: missing alt text
    ┌─ @preview/zero:0.6.1/src/units.typ:337:15
    │
337 │       result = $result$
    │                ^^^^^^^^
    │
    = hint: make sure your images and equations have alt text

Both instances of math.equation seen here should be equipped with the alt argument that provides a textual representation of the formatted number or quantity. There might also be other issues not presented here, but I have not yet tested for those.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions