From 79bd697440678d3694d88f7a2611ab9182c9ed00 Mon Sep 17 00:00:00 2001 From: Benjamin Mako Hill Date: Thu, 13 Aug 2026 19:15:05 -0700 Subject: [PATCH] Give frame titles as \frametitle so they are tagged as headings Only \frametitle{...} produces a tagged heading in ltx-talk. Giving the title as the argument to \begin{frame}{...} silently yields a frame with no heading element at all, which is why the deck had sections but nothing per slide. Use the command form throughout. The resulting headings sit at ltx-talk's default H4, nested under the H1 that a section produces. That level can be remapped with \tagpdfsetup if assistive software turns out to want frame titles higher up. Co-Authored-By: Claude Opus 5 (1M context) --- slides_template/README.ltx-talk | 19 +++++++++++++++---- slides_template/example.tex | 6 ++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/slides_template/README.ltx-talk b/slides_template/README.ltx-talk index 28403b8..203afa4 100644 --- a/slides_template/README.ltx-talk +++ b/slides_template/README.ltx-talk @@ -98,10 +98,21 @@ Upstream: https://github.com/mrc-pop/trantor === Known gaps ================= ================================ -Frame titles are not headings. ltx-talk's role map declares -frametitle -> H4, but no such elements are emitted, so the tag tree has -sections but no per-slide headings. The manual calls the relationship -between frame titles and sectioning "still very much open". +Frame titles must be given as \frametitle{...} inside the frame, not as +the argument to \begin{frame}{...}. Only the command form is tagged; the +argument form produces a frame with no heading at all, silently. This +looks like an upstream oversight rather than a decision, so it may change. + +ltx-talk tags frame titles at H4, deliberately well below sections and +subsections, and the manual describes the relationship between frame +titles and sectioning as "still very much open". That default is left +alone here. It can be changed with + + \tagpdfsetup{role/new-tag = frametitle/H1} + +but H1 would put frame titles at the same level as the section headings +that contain them, so it is worth deciding what an accessibility checker +should see before reaching for it. Overlay tagging has an open upstream bug, issue #33, where \only<1> and \only<2> produce output that fails validation. The \pause and <+-> forms diff --git a/slides_template/example.tex b/slides_template/example.tex index 7845af5..5a60ea2 100644 --- a/slides_template/example.tex +++ b/slides_template/example.tex @@ -53,7 +53,8 @@ \section{Introduction} \sectionpage -\begin{frame}{A sample slide} +\begin{frame} + \frametitle{A sample slide} A displayed formula: \[ \int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi} \] @@ -71,7 +72,8 @@ \note<3->{Once the whole list is up, tie it back to the opening claim.} \end{frame} -\begin{frame}{Short frame title} +\begin{frame} + \frametitle{Short frame title} \e{A first} paragraph with \texttt{monospace text}. And then \e{a second} paragraph.