Skip to content

PDF Accessibility (tags, alt text, ...) #133

Closed

Description

@JadedBlueEyes

This sort of links to #114 and #129 - Typst should support accessible output formatting - for example, tagged PDF. Latex does not support this, and so people and organisations that want to produce accessible documents are forced to manually mark up documents in Adobe Acrobat.

Typst outputting accessible documents would be a huge win both for the disabled community and organisations and individuals that produce documents. I think it would make people a lot more likely to use and suggest the project as well.

For some more context, the LaTeX Project Team have been working on trying to get something like this in LaTeX for a while - https://www.pdfa.org/presentation/tagged-and-accessible-pdf-with-latex/

Activity

  1. ErroneousBosch commented on Mar 22, 2023

    @ErroneousBosch

    Tagging in PDFs are a major part of the equation, but options such as being able to ensure reading order, and alt text for images/math equations also feed into it. This would be a huge deal given LaTeX's struggle with accessibility.

  2. hcsch commented on Mar 22, 2023

    @hcsch

    https://www.pdfa.org/resource/deriving-html-from-pdf/ is a best practices guide for tagged PDF syntax (also covers some general information/guidance around the format), and with regards to #114 and this issue https://www.pdfa.org/resource/deriving-html-from-pdf/ is perhaps also an interesting document.
    https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/ lists (past) news about work of the LaTeX community on this topic.

  3. jasonjgw commented on Mar 22, 2023

    @jasonjgw

    Based on my own experience, combined with various discussions on the blindmath mailing list and elsewhere, there is general agreement that HTML output is far preferable to screen reader users than PDF of any kind, whether tagged or not. That is, for users who are blind, producing high-quality HTML output would be the best path to take (preferably with MathML included).

    Most PDF reading applications don't even interpret the tags, where present, and the reading experience doesn't match what an HTML browser can do, on multiple platforms and with multiple screen reading technologies, desktop and mobile alike.

    Based on the reference documentation for Typst, at the moment there are no function parameters for specifying a short description of an image - what would appear in an HTML ALT attribute. Also, the digital publishing accessibility community has developed best practices for including extended descriptions in documents. These descriptions can include entire document structures (e.g., tables, paragraphs, etc.). At the moment, the favoured technique is to use the HTML 5 summary/details elements, with some WAI-ARIA markup. There are other approaches as well. Many figures in technical and scientific documents would probably require, or at least benefit from extended descriptions, which authors should be able to include in the source markup.

    Another accessibility requirement (currently a problem for LaTeX) is to distinguish between header and body cells in tables.

    I'm sure there will be further issues to consider. I would be interested in testing the HTML export functionality when it is integrated into the compiler, and in contributing comments. At the moment, I use LaTeX for much of my writing, from which I generate HTML for review with a screen rader (i.e., interactive braille output and text to speech).

  4. u-fischer commented on Apr 2, 2023

    @u-fischer

    for example, tagged PDF. Latex does not support this

    This is not true. LaTeX supports tagged PDF since quite some time. The documentation of tagpdf and the texlive vpat e.g. has been tagged with LaTeX, and there exist also some non-public implementations (e.g. from Ross Moore and from a publisher in Germany). The goal of the LaTeX Project is not to make tagging possible, but to make it automatic, free and easy to use so that an average user can handle it (and since the latest latex-dev release this already works quite well for simple documents, and it will get better until the summer).

  5. added
    feature request
    pdf
    on Apr 4, 2023
  6. changed the title [-]Support accessible output[/-] [+]PDF Accessibility (tags, alt text, ...)[/+] on Apr 4, 2023
  7. domoritz commented on Apr 11, 2023

    @domoritz

    Based on my own experience, combined with various discussions on the blindmath mailing list and elsewhere, there is general agreement that HTML output is far preferable to screen reader users than PDF of any kind, whether tagged or not. That is, for users who are blind, producing high-quality HTML output would be the best path to take (preferably with MathML included).

    While HTML is preferred, I just want to add that it's still important to generate accessible PDFs since some people will distribute only a PDF version and we should not exclude screen reader users from reading those documents.

  8. SeSodesa commented on Aug 28, 2023

    @SeSodesa
    Contributor

    The lack of PDF/UA support is also a blocker for producing public documents, such as study materials for consumption in the European Union. This is due to the newish EU accessibility directive (link).

  9. added
    model
    and removed on Nov 24, 2023
  10. laurmaedje commented on Nov 29, 2023

    @laurmaedje
    Member

    Just because there was no "official" response in this thread before: We definitely plan to make Typst's output accessible in the future, we just haven't gotten to it yet. It needs some work on compiler internals, but overall I believe we're in a good position because there is quite a lot of semantic information available in Typst documents. The necessary reworks are also partially shared with those for HTML export, which is good.

  11. acxz commented on Jun 8, 2024

    @acxz

    for example, tagged PDF. Latex does not support this

    This is not true. LaTeX supports tagged PDF since quite some time. The documentation of tagpdf and the texlive vpat e.g. has been tagged with LaTeX, and there exist also some non-public implementations (e.g. from Ross Moore and from a publisher in Germany). The goal of the LaTeX Project is not to make tagging possible, but to make it automatic, free and easy to use so that an average user can handle it (and since the latest latex-dev release this already works quite well for simple documents, and it will get better until the summer).

    Just a follow up to this and to add an additional resource:
    LaTeX examples on conforming to various PDF Accessibility (including PDF/UA-2)
    latex3/tagging-project#72

  12. ErroneousBosch commented on Jun 8, 2024

    @ErroneousBosch

    My day job is as a web developer and accessibility professional for a major academic research institution, and in evaluating LaTeX tagging for our faculty I found that it is not in a usable state either using the tagpdf package or using the core tagging via TeXLive. One of the major issues is decision to program to the PDF/UA-2 standard, which isn't implemented by any currently available reader software even four years after its release.

    As I point out in the thread @acxz links to, compliance to an unused/unimplemented standard means that in practical terms the PDFs it generates aren't accessible, and aren't going to be in any useful timeframe. It is so bad in fact that we are recommending that our faculty no longer use it for class materials at all, and we are trying to figure out a solution for research papers. I would urge the developers here to not follow LaTeX's decision path. PDF/A-2 may end up a great solution if it is ever widely adopted, but for right now it isn't useful to set as a goal.

  13. 11 remaining items

  14. domoritz commented on Oct 1, 2024

    @domoritz

    Also hugely in favor of supporting accessible PDFs (in addition to HTML as an even more accessible format). Recently, Latex has been making a lot of progress on supporting tagged PDFs: https://latex-project.org/news/2024/07/08/tagging/.

  15. u-fischer commented on Oct 1, 2024

    @u-fischer

    @samtalki

    LaTeX has completely failed to meet this important challenge.

    It hasn't. We put lots of work and thought into this topic in the past years and as a result LaTeX was one of the first to be able to produce Well Tagged PDF (WTPDF) when the PDF association released that standard at the begin of the year and many documents can now be tagged automatically and easily with LaTeX.
    This work will continue --- how fast depends also on founding, support from users e.g. to create test files and support from package and class authors who have to adapt their code.

    I'm serving as an instructor this semester and tagging is completely non-functional in Beamer in particular.

    beamer is quite a challenge. The beamer class is quite large but stems from a time when only very few people thought about accessibility. Some discussion and also some minimal code to get beamer tagging aware is here latex3/tagging-project#710.

  16. ErroneousBosch commented on Oct 1, 2024

    @ErroneousBosch

    I'll believe it when I see it. The tools just aren't there yet, neither for production nor consumption.

    @Enivex I work for a major state university in the US in their college of engineering that does huge amounts of research. The university's policy is now that all materials, including PDFs from researchers, must meet WCAG 2.0 AA compliance. Tools or not, the requirement is in place and furthermore will be mandated by US federal law starting April 2026. We have had to tell our researchers they can no longer use LaTeX without remediating each document. As I have explained in other discussions, ideals are fine to have but we are well into where the rubber has to meet the road. If Typst can step up to create PDFs that meet the needed standards, it would be a fantastic solution.

    @u-fischer I'm curious to see what progress LaTeX has made and will have to revisit my evaluations

  17. florian-obernberger commented on Mar 4, 2025

    @florian-obernberger

    I am not sure how exactly typst implemented the HTML export, but wouldn't progress towards generating HTML also mean progress towards tagged PDFs? If I can produce the tags for a table in HTML, I can also produce the same tags for the PDF, no?

    One thing that obviously differs is that the tags for paragraphs cannot cross page boarders.

  18. laurmaedje commented on Mar 4, 2025

    @laurmaedje
    Member

    Yes, HTML export helps (although it still is far from making it trivial). Work on tagged PDF is slowly progressing through that and #5420.

  19. Nicceboy commented on May 7, 2025

    @Nicceboy

    Just to add to the list; in Finland, new global accessibility requirements will come into force, starting from 28.6.2025, as a result of the previously mentioned European Accessibility Act. From that day, the directive will be enforced across the EU, so I suppose everyone will need PDF/UA files pretty soon.

  20. Timtam commented on Sep 24, 2025

    @Timtam

    Blind PhD student here, is there any update on this topic? Now that the EU accessibility act is active, I want to write my thesis and papers in a format that is as accessible as possible, and publishing will most likely happen as PDFs. I just learned about Typst and would like to replace my LateX workflow with it if possible, but creating accessible PDFs is definitely one of the must haves here.

  21. mohe2015 commented on Sep 24, 2025

    @mohe2015

    To me it seems like there is very active progress in #6619

  22. Enivex commented on Sep 24, 2025

    @Enivex
    Collaborator

    Blind PhD student here, is there any update on this topic? Now that the EU accessibility act is active, I want to write my thesis and papers in a format that is as accessible as possible, and publishing will most likely happen as PDFs. I just learned about Typst and would like to replace my LateX workflow with it if possible, but creating accessible PDFs is definitely one of the must haves here.

    I believe the intention is that it should be a part of 1.14, which isn't too far away now. "Only" PDF/UA-1 though, not PDF/UA-2.

  23. Nicceboy commented on Sep 24, 2025

    @Nicceboy

    Blind PhD student here, is there any update on this topic? Now that the EU accessibility act is active, I want to write my thesis and papers in a format that is as accessible as possible, and publishing will most likely happen as PDFs. I just learned about Typst and would like to replace my LateX workflow with it if possible, but creating accessible PDFs is definitely one of the must haves here.

    Fair warning that many journals/conferences still want LaTeX source and Typst is not always okay :(

  24. jasonjgw commented on Sep 24, 2025

    @jasonjgw

    The basic HTML support already available in Typst 0.13.1 gave semantically correct output in my test, so I think this work is progressing in the right direction. When I was a "blind Ph.D. student" myself, I used LaTeX to typeset my thesis, and of course I've used it subsequently for published work. The potential advantage of Typst is that the extension packages will be able to customize the HTML output for the parts of the document that they render.

  25. saecki commented on Oct 2, 2025

    @saecki
    Member

    With #6619 merged I think this general issue has been addressed!

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

    feature requestmodelpdf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions