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
Gallery image alt text describes the API an entry teaches, not what the picture shows.
Gallery cards:card_alt() in scripts/build_gallery.py builds "{name} — {first sentence of teaches}", capped at 160 characters. 29 of 79 alts are cut with "…". As of fix(site): finish the Pages review follow-ups #209, the card's image link is aria-hidden, so card alts no longer reach screen readers at all.
Detail-page hero and zoom image:"{name} render" and "{name} render, full size".
"swatch-grid render" tells a screen-reader user nothing about the image. The READMEs already contain good visual descriptions, e.g. showcase/crate-stack/README.md's image alt: "Three shipping crates stacked, each yawed and offset differently".
Proposal
Add an optional alt field to each examples/gallery.json / showcase/gallery.json entry: one sentence describing the picture.
Use it for the detail-page hero, the zoom image and the landing cards, falling back to today's text.
Once backfilled, have build_gallery.py require it for new entries, the way it already guards alts against dotted-path truncation.
What
Gallery image alt text describes the API an entry teaches, not what the picture shows.
card_alt()inscripts/build_gallery.pybuilds"{name} — {first sentence of teaches}", capped at 160 characters. 29 of 79 alts are cut with "…". As of fix(site): finish the Pages review follow-ups #209, the card's image link isaria-hidden, so card alts no longer reach screen readers at all."{name} render"and"{name} render, full size"."{name} render"(scripts/site/template.html.j2)."swatch-grid render" tells a screen-reader user nothing about the image. The READMEs already contain good visual descriptions, e.g.
showcase/crate-stack/README.md's image alt: "Three shipping crates stacked, each yawed and offset differently".Proposal
altfield to eachexamples/gallery.json/showcase/gallery.jsonentry: one sentence describing the picture.build_gallery.pyrequire it for new entries, the way it already guards alts against dotted-path truncation.79 one-line descriptions: content work, not code.