Skip to content

revealjs: improve speaker view labels and landmark navigation - #15164

Merged
cderv merged 2 commits into
quarto-dev:mainfrom
jooyoungseo:fix/revealjs-speaker-view-a11y
Oct 23, 2026
Merged

cderv merged 2 commits into
quarto-dev:mainfrom
jooyoungseo:fix/revealjs-speaker-view-a11y

Conversation

@jooyoungseo

Copy link
Copy Markdown
Collaborator

Description

Closes #15159.
Closes #15160.

Backport hakimel/reveal.js#3953 to the bundled reveal.js 5.1.0:

  • Give the speaker-view Layout select a native, stable accessible name and a visible focus indicator.
  • Add named region landmarks for Current slide, Upcoming slide, Time, and Speaker notes, preserving the existing hidden-layout and empty-notes behavior.
  • Name the preview iframes and stop forwarding keys from native controls to the slide preview.
  • Replace the slide-controls aside with a neutral div. The previous/next buttons remain accessible buttons without creating a separate complementary landmark in the main presentation or its preview.

The new source patch applies after the three existing reveal.js patches. The dependency-update script now rebuilds the plugins as well as the core, so future updates retain the notes-template fix. Included core UMD/ESM bundles and source maps, notes UMD/ESM bundles, and the speaker-view template were rebuilt from the 5.1.0 source using its Gulp/Rollup pipeline; they are not hand-edited minified bundles. Existing announcement and focus patches are retained.

Validation

  • Official 5.1.0 core/plugin rebuild with Node 22.23.4 passed. Verified that the backport patch matches the built source and the source maps contain the updated controls source.
  • Added seven Playwright speaker-view tests covering the accessible name, keyboard focus and selection, all four layouts, named regions, preview titles, native navigation buttons, fragments, and empty/restored notes.
  • Ran the new suite together with the existing fragment-announcement, image-announcement, and visibility/focus suites in Chromium: 29 tests passed.
  • Local fixtures were rendered with Quarto CLI 1.11.5, then supplied with this branch's rebuilt reveal.js assets. The focused run used a local static server and Chrome Headless Shell 152; it did not rebuild the entire Quarto executable or run the complete Quarto test suite.
  • The reporter tested the review HTML with a screen reader, requested the controls-landmark correction, and approved the revised build before submission. The review builds also passed 124 automated accessibility-tree/DOM/interaction checks across standalone reveal.js and Quarto, over HTTP and direct file loading.

The existing physical-Space shortcut behavior on a focused previous-slide button is unchanged and not part of this backport.

Checklist

  • Referenced the issues this PR closes
  • Updated news/changelog-1.11.md
  • Added new tests
  • Ran the focused new and related regression suites described above
  • Ran the complete Quarto test suite (not run; this is a vendored reveal.js backport)
  • Documentation PR: not applicable; no author-facing configuration changes
AI-assisted PR
  • AI tool used: OpenAI assistant through Aside.
  • Codebase grounding: Local reveal.js and quarto-cli clones, the existing source patches and dependency-update procedure, and the repositories' QUnit/Playwright tests.
  • Human review: The contributor tested the candidate with a screen reader, supplied corrective feedback about the navigation-button landmark, and explicitly approved the revised build and this PR submission. The assistant performed the source/build verification and automated tests reported above. No specific screen reader/browser version is claimed for the manual check.

@jooyoungseo
jooyoungseo requested review from cderv and a balanced review from Copilot October 22, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@posit-snyk-bot

posit-snyk-bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, and for opening the upstream PR first.

I checked the rebuilt files against reveal.js 5.1.0 with the four patches applied. speaker-view.html matches the patched source, the notes bundles embed it as is, and the core bundles and source maps only change the controls aside to a div. The new speaker view tests pass for me locally in Chromium, Firefox and WebKit, and they fail on the current reveal.js files.

We'll push a small adjustment on your branch before merging, so no need to push anything meanwhile. It moves the changelog entry to its place by issue number, and makes the layout test compare the full slide indices: the first slide has a fragment, so with the key forwarding back, ArrowDown reveals the fragment and the horizontal index alone stays at 0.

The layout test checked only the horizontal slide index after pressing
ArrowDown on the Layout select. The fixture's first slide has a fragment,
so when the speaker view forwards the key to the slides, the fragment is
revealed and the horizontal index stays at 0: the test passed without the
native-control guard. Compare the full indices before and after instead.

Move the changelog entry to its place by issue number in the
Accessibility section, and word it as a fix.
@cderv
cderv merged commit 303b95f into quarto-dev:main Oct 23, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants