a11y(#1020): consistent alt text for related-project sidebar thumbnail#1348
Merged
Conversation
…audit) Phase 1 of an admin-listing-page audit (follow-up to #1082). Low-risk, config-level improvements plus one bug fix; no query-shape changes. Bug fix: - NewsAdmin.get_display_thumbnail had no exception guard, so one corrupt or unreadable image would 500 the entire News changelist (the column renders for every row). Now guarded; logs and falls back to the "No Thumbnail" placeholder. Regression test added. Findability (these admins previously had no/!weak search, ordering, or date navigation): - Author/speaker search across the artifact family: Publication, Talk, Poster all searchable by author name (via the shared ArtifactAdmin default); Publication also by book title + DOI. - News searchable by headline + author; Keyword, ProjectUmbrella, Photo, Position, Project gained search boxes / broader search. - Fixed useless DateField string-searching: Poster ['title','date'], Video and Grant dropped 'date'; Grant added PI/Co-PI + sponsor search, Video added project search. - Added default ordering where none existed: Poster (-date), Project, ProjectUmbrella, Sponsor, Keyword. - Added date_hierarchy drill-down to the date-driven content admins: Publication, Talk, Poster, Video, Grant, Award, News. Deferred to later phases (per the audit): N+1 query fixes on Project/ Person changelists, list_editable toggles, bulk actions, Keyword cleanup tooling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match the desktop related-projects sidebar thumbnail to the mobile card view, which already uses Project.get_thumbnail_alt_text() (descriptive text with a sensible fallback) instead of the bare project name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 the alt-text consistency gap noted while reviewing #1020. The desktop related-projects sidebar thumbnail used a bare
alt="{{ related_project.name }}", while the mobile card view already usedProject.get_thumbnail_alt_text()(descriptive text with a sensible fallback). This makes the two consistent.Changes
website/templates/website/project.html: desktop sidebar related-project<img>now usesget_thumbnail_alt_text(matching the mobile view).Context
Issue #1020's two original asks (ProjectHeader banner alt text, gallery thumbnail alt text) were already resolved by the Banner system and
Project.thumbnail_alt_text; #1020 has been closed. This PR is the small consistency follow-up.a11y note
This is an alt-text-only change with no visual diff, so no before/after screenshots. Note the sidebar
<img>is wrapped in<a aria-label="View project: …">, so the link's accessible name comes from the aria-label; this change improves the image's ownaltfor consistency.🤖 Generated with Claude Code