Skip to content

PDF/UA-1: Pages with link annotations missing tab order (S entry) #7990

Closed

Description

@bryskhe

Description

When a Typst document contains link annotations (e.g. #link, TOC entries, cross-references), the PDF pages that contain these links do not have their tab order (S entry in the page dictionary) set to S (document structure). This violates PDF/UA-1 Matterhorn checkpoint G4_F07 ("Tab order for pages with annotations missing").
The result is that PDF accessibility checkers (e.g. Adobe Acrobat) report incorrect or undefined tab order on pages with links, and keyboard users may experience non-logical tab navigation.
To reproduce: Create a document with #outline() and any #link() or cross-reference. Export with --pdf-standard ua-1. Open in Acrobat and run the full accessibility check.
Expected: All pages with annotations should have tab order set to follow document structure.
Typst version: 0.14.2

Operating system

Windows

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Mar 16, 2026
  2. self-assigned this
    on Mar 16, 2026
  3. added
    pdf
    accessibility
    on Mar 16, 2026
  4. LaurenzV commented on Mar 16, 2026

    @LaurenzV
    Collaborator
    #set document(title: "The document title")
    #outline()
    #set heading(numbering: "1)")
    
    = Hi there <a>
    
    In @a, you can see this.
    

    Does this trigger it for you? At least in veraPDF this seems to pass fine, unfortunately I don't have an Acrobat subscription anymore so I can't test it there. :(

  5. bryskhe commented on Mar 17, 2026

    @bryskhe
    Author
  6. saecki commented on Mar 17, 2026

    @saecki
    Member

    She did find one issue though — the minimal example fails on Lists > Lbl/LBody. The error appears as Lbl/LBody 1 under the Lists check. She found the description of the error herehttps://helpx.adobe.com/acrobat/using/create-verify-pdf-accessibility.html#LblLBody — though we're not entirely sure what's causing it in this case. Our best guess is that it's related to #set heading(numbering: "1)") generating a label that isn't wrapped in the correct PDF tag structure, but we could be wrong.

    Adobe uses a non standard compliant check for the use of Lbl tags, so this is expected, but seems unrelated to the original issue.

    Since we can't reproduce the issue, it would be very helpful if you could provide an ideally minimal Typst example document that triggers the check.

  7. bryskhe commented on Mar 17, 2026

    @bryskhe
    Author
  8. saecki commented on Mar 17, 2026

    @saecki
    Member

    Thanks for the minimal reproduction example.

    Our guess is that Acrobat requires the tab order entry to be set on all pages, not just pages that have annotations. Could that be the issue?

    Yes, that seems to be the issue. Since The PDF/UA-1 specification (7.18.3 Tab order) explicitly states that this is only required when there are annotations on the page, I think this is an issue with Acrobat, not Typst/krilla:

    Every page on which there is an annotation shall contain
    in its page dictionary the key Tabs ...

    We try to adhere to the official PDF specifcations, and Adobe Acrobat implements some checks that are either not mentioned in the spec, and sometimes even contradict it. The one discussed here just seems like a bug to me. We suggest using other tools like PAC or veraPDF to validate accessibility of PDF files. Here is a list from the PDF association: https://pdfa.org/tools-for-accessible-pdf/

  9. LaurenzV commented on Mar 17, 2026

    @LaurenzV
    Collaborator

    I mean, I would be fine changing the behaviour if it helps, it's not a big deal just always adding it, after all. Or is there something speaking against this?

  10. saecki commented on Mar 17, 2026

    @saecki
    Member

    I guess not, maybe I was a bit quick to close this, since the behavior is technically correct. But one extra entry per page isn't really an issue.

  11. reopened this on Mar 17, 2026
  12. bryskhe commented on Mar 17, 2026

    @bryskhe
    Author
  13. Enivex commented on Mar 17, 2026

    @Enivex
    Collaborator

    Is this causing any actual issues in practice?

    I don't see why changes should be made just to please a checker that doesn't follow the standard.

  14. LaurenzV commented on Mar 17, 2026

    @LaurenzV
    Collaborator

    Because unfortunately, Adobe Acrobat is widespread and people might be required that their PDF passes their checks. Therefore, unless it really inconveniences us (which in this case it doesn't I think), we should just provide the workaround, even if it's annoying.

  15. added a commit that references this issue on May 18, 2026
    a50673f
  16. added 3 commits that reference this issue on May 27, 2026
    cc05c28
    58c3f8b
    3b3bc3f
  17. added 2 commits that reference this issue on May 29, 2026
    0d06d95
    b527da8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

accessibilitybugpdf

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions