You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: caption should not be used as fallback alt text
Remove the caption-as-alt fallback introduced in the PDF/UA compliance
work (a867c3c, ba75b37). Using captions as alt text is an
accessibility anti-pattern — captions describe a figure's significance
in context while alt text describes what the image looks like.
LaTeX: remove 3 caption-as-alt blocks in latex.lua, and add fig-alt to
alt conversion in pandoc3_figure.lua for Pandoc 3 Figures without
cross-ref labels.
Typst: mark figure images with _quarto_no_caption_alt so that the
caption-as-alt fallback in typst.lua only fires for inline images
(where image.caption IS the standard markdown alt text).
Key insight: In Pandoc 3, {alt="text"} replaces the Image's caption
content rather than populating image.attributes["alt"]. So
image.caption serves double duty as both visible caption and alt text
override. We distinguish the two cases by comparing image.caption to
figure.caption — when they match, the caption was NOT overridden (the
bug case we suppress); when they differ, an explicit {alt="..."} was
provided (which we preserve). This is the same heuristic Pandoc's own
Markdown writer uses when round-tripping Figures.
Explicit fig-alt (Quarto's dedicated attribute) flows through a
completely separate path and always works unambiguously.
Fixes#14107
0 commit comments