Repository navigation
revealjs: screen readers hear incremental content before it is revealed, and each slide twice #15019
Description
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
In revealjs presentations, what screen readers are told (reveal.js's .aria-status live region) has two problems:
- Content is announced before it is revealed. Entering a slide with an incremental list announces every bullet, including the ones not shown yet. The same goes for
. . .pauses and other fragments. A screen reader user hears the whole slide before it is revealed, then each bullet again as it appears. - Slides are announced twice. Quarto sets
history: trueby default, and each slide made from a heading has an id. With both, reveal.js handles its ownhashchangeby navigating to the slide again, which announces it a second time. Withfragment-in-url: true, each Space also announces the new bullet three times and then the whole slide again.
With a screen reader, stepping through a slide with Space then sounds like the content already on it being read again before each new bullet.
Both come from reveal.js, and I reported them upstream with a proposed fix: hakimel/reveal.js#3945. The same code is in reveal.js 5.1.0, which Quarto bundles, and in 6.0.2 and master.
Steps to reproduce
---
title: "Incremental test"
format:
revealjs:
incremental: true
---
## Slide A
- First point
- Second point
- Third point
## Slide B
- Alpha
- BetaRender it, open the presentation and step through it with Space. To see the announcements without a screen reader, paste this into the browser console on the title slide first:
new MutationObserver( records => records.forEach( r => r.addedNodes.forEach( n => console.log( JSON.stringify( n.textContent ) ) ) ) )
.observe( document.querySelector( '.reveal .aria-status' ), { childList: true } );Actual behavior
Pressing Space from the title slide:
| Space | Announced |
|---|---|
| 1, to Slide A | Slide A First point Second point Third point, twice |
| 2 | First point |
| 3 | Second point |
| 4 | Third point |
| 5, to Slide B | Slide B Alpha Beta, twice |
Opening the presentation announces Incremental test twice as well.
With fragment-in-url: true, Space 2 announces First point three times and then Slide A First point Second point Third point, and so on for every bullet.
Expected behavior
Each announcement once: Slide A when the slide is entered, then only the bullet each Space reveals.
Your environment
- Quarto 1.10.19, and main at a57cc76
- Chromium 141 on Linux
Quarto check output
Not included: the problem is in the bundled reveal.js that runs in the browser, and it is the same on 1.10.19 and on main.
Fix
I checked the upstream change in a rendered Quarto presentation by swapping in a reveal.js build that has it: Slide A is announced once when the slide is entered, then only the new bullet on each Space, with fragment-in-url on or off. Quarto bundles 5.1.0 and the move to 6.x is a separate upgrade, so Quarto could carry the change until then, as #15010 did with the inert fix from reveal.js 6.0.2.
In the meantime, history: false stops the repeated announcements. The URL still follows the slides, but the browser's Back button no longer steps through them. Nothing stops content from being announced before it is revealed.
Activity