Skip to content

Produce tagged PDFs#2273

Draft
CrossR wants to merge 1 commit into
slidevjs:mainfrom
CrossR:CrossR/TaggedPDFs
Draft

Produce tagged PDFs#2273
CrossR wants to merge 1 commit into
slidevjs:mainfrom
CrossR:CrossR/TaggedPDFs

Conversation

@CrossR

@CrossR CrossR commented Sep 10, 2025

Copy link
Copy Markdown

Opening this more for discussion, as I'm sure there is plenty of things I'm not considering...so didn't want to spend a bunch of time on it then realise I'd missed a bunch.

Chrome a while ago added the ability to export tagged PDFs, then a bit later, puppeteer added the functionality to use that as well: puppeteer/puppeteer#7509.
That has both the feature in chrome linked, then later the PR to add it to puppeteer.

Enabling it makes the produced PDF documents more accessible, and means things like "alt" text on images are exported:

Before change:

Screenshot 2025-09-10 at 13 58 12

After Change:

image

With the code in the demo slides just being:

<img border="rounded" src="https://github.com/slidevjs/themes/blob/main/screenshots/theme-default/01.png?raw=true" alt="Image of an alternative theme,  with a water background.">

This is obviously not a complete PR, but does show that with an extra option passed over in 3 more places, the produced PDFs (if some time is spent on adding alt text to ones talks too...) could be a lot more usable via screen readers and such.

There is probably a question of "Are the PDFs even readable enough for this to matter" which I can't really answer, but it would be cool to see this change added.

Things I don't know:

  • Browser and browser version support?
  • Enabled by default or not? Option for it, or just always on etc.
  • Anything else I'm missing? Can it be enabled via Chrome /export or only the CLI etc.

As I say...this is mostly for a discussion, so if someone with more experience / time already has answers to my questions above, and wants to work on it instead, that is fine with me! I'd just like my slides to be slightly more readable for my colleagues.

Apologies if I missed an open issue / PR on this....I searched a few terms but didn't find anything.

@netlify

netlify Bot commented Sep 10, 2025

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 89eb7ca
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/68c177575164270008c3873b
😎 Deploy Preview https://deploy-preview-2273--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jrg94

jrg94 commented Jan 9, 2026

Copy link
Copy Markdown

I was able to verify that this change works on a much older version of slidev (0.37.1). I have not updated because I use the Unicorn theme, and it has not been modernized for newer versions of slidev. In any case, manually editing in the tagged: true lines worked for me.

As an educator, the tagged PDF is a lifesaver. We're required now to meet higher accessibility standards with our materials, and this change was able to get me a better accessibility score on my existing slide decks. Normally, I would see something like this:
image

This pull request gets me much closer to a "passing" score (though, I'm not sure decorative images like the logo in this case should even have alt tags):
image

@ani-per

ani-per commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

@antfu @kermanx Just bumping this a bit as it's a very tiny PR with a significant upgrade in value, so could be reviewed pretty quickly.

@c-harding

Copy link
Copy Markdown

It looks like this flag was originally added to Playwright because of the increase in file size. How much does this update affect your PDF file size? Do you think it would be worth adding a new flag to the export commands to enable/disable this feature?

microsoft/playwright#13917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants