fix(gallery): describe each still in its alt text instead of the API it teaches - #221
Merged
Merged
Conversation
…it teaches Every gallery image's alt was derived from `teaches`, which says what the code proves, not what the picture shows, and 29 of 79 card alts were cut at 160 characters. Detail-page, zoom and landing images said only "<name> render". - Each examples/ and showcase/ gallery.json entry gains an `alt`: one sentence written from the committed still (all 79, longest 135 chars). - build_gallery.py uses it for the card, the detail hero, the zoom image and the zoom button label, and fails the build on a missing or overlong alt. The teaches-derived card_alt/first_sentence helpers go. - The landing template uses it for both card grids. - CLAUDE.md, CONTRIBUTING.md and docs/new-example-prompt.md say new entries need one. Closes #213 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> # Conflicts: # scripts/build_gallery.py
Owner
Author
|
Merged |
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.
Summary
Closes #213. Every gallery image's alt described the API an entry teaches, not the picture:
"{name} — {first sentence of teaches}", with 29 of 79 cut at 160 characters. Detail-page, zoom and landing images said only"{name} render".Type
featfix— accessibility and contentdocs/chore/ci/refactorChanges
alton all 79 entries inexamples/gallery.jsonandshowcase/gallery.json. Each is one sentence, written by looking at the committed hero; the longest is 135 characters. Examples:light-link-studio: "Two spheres on pedestals: a brightly lit orange sphere labelled LINKED and a dark grey sphere labelled UNLINKED."lod-decimate-chain: "Three red and white rockets labelled LOD0, LOD1 and LOD2, each more coarsely faceted than the last."text-version-stampstays version-neutral: "…the Blender version number in large gold 3D characters."build_gallery.pyuses it for the card image, detail hero, zoom image and zoom button (aria-label="View full size: …"). Newcheck_alts()fails the build on a missing alt or one over 200 characters. Thecard_alt/first_sentence/assert_alts_survive_dotted_pathshelpers are removed; their only job was deriving the old alt.template.html.j2): both card grids useex.alt, falling back to the old text.CLAUDE.md(the one example-wiring sentence),CONTRIBUTING.mdstep 3 anddocs/new-example-prompt.mdsay new entries need analt.Evidence
stone-welldetail hero and zoom both read "A round stone well of grey blocks under a four-post wooden roof, with a bucket hanging inside."alt; none end in " render".campfire'saltmakesbuild_gallery.pyexit 1 withgallery entry 'campfire' has no 'alt': add one sentence describing what its still shows. Restored.json.treasure-chest"An open wooden treasure chest with a vaulted lid and dark iron bands").Merge note
This touches
build_gallery.pyandtemplate.html.j2, as does #220 (fonts and og card), but in different hunks. Whichever merges second getsmainmerged in and the gallery regenerated, which the new Validate drift check enforces.Checklist
CLAUDE.mdedit is deliberate and one line.Signed-off-by:present.🤖 Generated with Claude Code