Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generate tagged PDF documents for accessibility#6619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
saecki wants to merge79 commits intomain
base:main
Choose a base branch
Loading
frompdf-accessibility

Conversation

saecki
Copy link
Member

@saeckisaecki commentedJul 16, 2025
edited
Loading

This will be the first PR in a larger effort to make PDF documents generated by typst compliant with PDF/UA-1 and more accessible in general. Tagging of PDF documents will be enabled by default to ensure a baseline of accessibility and
the--pdf-standard=ua-1 flag can be used in the CLI to enable further checks demanded by the PDF/UA-1 specification. Note however that this cannot guarantee full compliance, since some parts can only reasonably be validated by a human.

Here is a check list currently used for development. Some of the elements are only here for completeness sake and may not require any implementation:

  • investigate introspector performance due to increased number of tags
  • elements
    • headings
      • initial support
      • generateLbl for numbering
    • outlines
      • generate nestedTOCs for different levels of headings
      • mark fill as artifact
      • generateLbl for numbering
    • tables
      • mark table gutters as artifacts
      • generateTH tags for table header rows
      • groupTHead,TFoot, andTBody row groups.
      • some temporary hacky way to set the table-header-scope on cells
      • ignore repeated headers/footers
      • generateHeaders attribute
      • fix table.header with multiple rows
      • use last repeated footers
    • figure
      • captions
      • BBox and width/height
    • image
      • wrap in figure tag if not already inside one
    • terms
    • lists
    • enumerations
    • bibliography
    • quote
    • ref
    • cite
    • footnotes
    • grid
    • stack
    • columns
    • block
    • box
    • inline
    • shapes, line, path, and curve
    • text layout elements
      • strong, underline, overline, strike, sub, sup, emph, highlight, smallcaps
    • layout elements
      • skew, scale, rotate, move
    • symbol
    • repeat: mark as artifact
    • raw
    • math
      • generate a formula tag
      • allow specifying an alternative description
    • place: possibly interfering with reading order
    • hide: don't generate tags
    • frame
    • links
      • only generate quadpoints for links in PDF/UA mode
        • most pdf readers (even acrobat) don't handle them properly
      • link annotation alt description (Contents attribute) is required
        • generate alt text where applicable
  • fix grid layouting issues due toTableCell andGridCell tags
  • fix overlapping tags generated byPAR grouping rule
  • Bbox for bg artifacts
  • text handling
    • soft hyphens
    • ensure there is whitespace between words and at the end of lines
  • check the reading order of elements
  • some form of snapshot testing (maybe a human readable tag tree)

LaurenzV, bastienvoirin, elegaanz, andreasKroepelin, wrzian, cady-b, linux-user36, mohe2015, captchanjack-anzx, and hs-ye reacted with hooray emojiLaurenzV, bastienvoirin, elegaanz, cady-b, mohe2015, and captchanjack-anzx reacted with heart emojiLaurenzV, bastienvoirin, elegaanz, linux-user36, FlorentCLMichel, mohe2015, and captchanjack-anzx reacted with rocket emoji
saecki added30 commitsJuly 3, 2025 15:58
skip-checks:true
skip-checks:true# Please enter the commit message for your changes. Lines starting# with '#' will be kept; you may remove them yourself if you want to.# An empty message aborts the commit.## Date:      Wed May 28 17:47:35 2025 +0200## On branch pdf-accessibility# Your branch and 'origin/pdf-accessibility' have diverged,# and have 11 and 5 different commits each, respectively.## Changes to be committed:#modified:   crates/typst-ide/src/jump.rs#modified:   crates/typst-layout/src/flow/distribute.rs#modified:   crates/typst-layout/src/modifiers.rs#modified:   crates/typst-library/src/foundations/content.rs#modified:   crates/typst-library/src/layout/frame.rs#modified:   crates/typst-library/src/model/bibliography.rs#modified:   crates/typst-library/src/model/footnote.rs#modified:   crates/typst-library/src/model/link.rs#modified:   crates/typst-library/src/model/outline.rs#modified:   crates/typst-library/src/model/reference.rs#modified:   crates/typst-pdf/src/convert.rs#modified:   crates/typst-pdf/src/link.rs#modified:   crates/typst-render/src/lib.rs#modified:   crates/typst-svg/src/lib.rs#modified:   tests/src/run.rs#
- fix marking repeated headers/footers as artifacts- fix table row grouping with empty cells
if the caption is contained within the figure screen readers might ignore it
@LaurenzV
Copy link
Collaborator

Note however that this cannot guarantee full compliance, since some parts can only reasonably be validated by a human.

It probably should be possible to ensure that at least machine checks always pass, right?

@saecki
Copy link
MemberAuthor

It probably should be possible to ensure that at least machine checks always pass, right?

Yeah, I don't see any other option. I think it just needs to be documented.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@saecki@LaurenzV

[8]ページ先頭

©2009-2025 Movatter.jp