Authoring and print
Checks while you write, and what survives an export.
Two of the plugin’s jobs happen away from a live audience. One helps you while you write the deck. The other decides what is left when you export it.
Checking alt text while you write
format:
revealjs:
revealjs-plugins:
- a11y
revealjs-a11y:
alt-text-warnings: trueAn image with no alt attribute gets a thick red dashed outline and a red “Missing alt text” label below it. The label is hidden from screen readers, because it is there for you.
The check tells three cases apart.
- No
altattribute at all is treated as an oversight and is flagged. alt=""is treated as a deliberate statement that the image is decorative, and is not flagged.altwith text is correct, and is not flagged.
In Quarto, write the text with fig-alt and it becomes the alt attribute.
{fig-alt="Three services behind one gateway."}The check only looks at the slide you are on, and it runs again on each slide change. An image on a slide you never open is never checked.
Take the option out before you show the deck or export it. The check is not switched off in print-pdf output, so a red outline can reach the file you hand over.
It reaches at most one slide there. The check reads the current slide, and an export has no slide changes, so only the slide the deck opens on is ever examined. That is enough to spoil a handed-over file, and not enough to audit a deck.
What reaches print-pdf
Most of the plugin is a live thing. It needs a browser, a reader and a keyboard, and none of that exists in an exported PDF.
The Reference lists what runs in print-pdf and what is skipped. Two entries on that list are worth a word here, because they are easy to get wrong.
High contrast takes the document option and ignores whatever the reader stored, so an export matches the document. Link highlighting does not. It reads the stored reader choice in an export exactly as it does in a live deck, so a reader who switched underlines off exports a PDF without them, whatever the document asks for.
The stylesheet also hides the panel, the skip link, the cue bar, the live region, the font picker, the pointer and the transcript overlay in any print, and it drops the reader’s font size and spacing overrides.
Fragments in the export
format:
revealjs:
pdf-separate-fragments: truepdf-separate-fragments is Quarto’s option, and RevealJS is what acts on it. It is false by default.
Left at false, a slide is exported once with every fragment visible.
Set to true, a slide becomes one page per fragment step, preceded by a page for the slide before anything is revealed. A slide with two steps therefore exports as three pages.
The option decides for the whole deck. There is no per-slide setting.
The plugin used to separate the fragments a second time, which doubled the pages and put every fragment on each of them, and it carried two slide attributes for choosing page by page.
Both are gone. A deck that still writes data-pdf-separate or data-pdf-no-separate is writing an attribute nothing reads.
Try it
print-pdf output is a browser mode rather than a build step. Open the preview deck, add ?print-pdf to the address, and print the page from the browser.