Add alt text to figures on authoring pages - #2138
Draft
cwickham wants to merge 1 commit into
Draft
Conversation
Contributor
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2138.quarto.org 🔄 Modified Documents |
cwickham
marked this pull request as draft
August 7, 2026 21:20
Fixes 12 `image-alt` violations (WCAG 2.0 A, SC 1.1.1) found by the axe
site audit. Each was an image with no `alt` attribute.
- `article-layout.qmd`: `fig-alt` on four knitr cells (six figures)
- `cross-references.qmd`: `fig-alt` on a subtable screenshot
- `_cross-references-listings.qmd`: `fig-alt` on the `fig-plot` cell
- `contents.qmd` and `cross-references-divs.qmd`: `fig-alt` on two images
- `penguins-qmd.qmd`: `fig-alt` on `fig-size-scatter`, which
`notebook-embed.qmd` embeds
- `cell-alignment.html`: `alt` on the placeholder image used by
`tables.qmd`
The two images on `placeholder.qmd` stay as they are. They come from the
`{{< placeholder >}}` shortcode, which emits no alt and accepts no alt
argument.
cwickham
force-pushed
the
fix/image-alt-authoring
branch
from
August 7, 2026 21:41
756eb2e to
4c9b2d4
Compare
Contributor
📝 Preview Deployment🔍 Full site preview: https://deploy-preview-2138.quarto.org 🔄 Modified Documents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 12
image-altviolations (critical, WCAG 2.0 A, SC 1.1.1) that the axe site audit found ondocs/authoring/pages. Each was an image with noaltattribute.Changes
article-layout.qmdfig-alton four knitr cells (six figures)cross-references.qmdfig-alton the identifier-only subtable screenshot_cross-references-listings.qmdfig-alton thefig-plotcellcontents.qmdfig-alton thecontentsshortcode screenshotcross-references-divs.qmdfig-alton the image used as a tablepenguins-qmd.qmdfig-altonfig-size-scatter, whichnotebook-embed.qmdembedscell-alignment.htmlalton the placeholder image in the cell alignment demoThree cells in
article-layout.qmduseecho: fenced, so the newfig-altoption is visible in the rendered code. This also shows readers how to use the option.Not fixed:
placeholder.qmdThe two images on
placeholder.qmdkeep no alt text. They come from the{{< placeholder >}}shortcode, which returnspandoc.Image({}, result)with an empty alt and accepts no alt argument. An author can work around this with, but this page documents the shortcode itself. A change to its examples changes what the page teaches. A fix belongs upstream in quarto-cli.Freeze notes
article-layout,cross-references,penguins-qmd, andtablesare frozen. Each was rendered from the repository root with R 4.5.2, which is the R version thatrenv.lockrecords. Every package used matchesrenv.lockexactly (0 version mismatches across all 165 locked packages).Two results in this PR need an explanation:
mainwere stale relative torenv.lock. This PR brings them into line.leaflet-binding-2.2.3andhtmltools-fill-0.5.9are new.renv.lockpins leaflet 2.2.3 and htmltools 0.5.9, so these paths are correct. The freeze onmainstill pointed at 2.2.1 and 0.5.8.1. The older directories stay becausedocs/presentations/revealjs/demostill references them.The
penguins-qmdfreeze holds two results,html.jsonandipynb.json. Onmainthese two had different hashes, and the staleipynb.jsonwas the reason the embedded figure lost its alt text. Both now share the same hash.Verification
No image lacks an
altattribute on any edited page:article-layout,contents,cross-references,cross-references-divs,notebook-embed,penguins-qmd, andtablesall return nothing.placeholderstill returns its two images.