diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fb3ff1..245832b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - After such a failure, every request failed with "database is locked" for about 10 seconds: database connections now roll back unfinished writes when they're returned to the pool - The same photo listed twice in one post is shown once instead of failing the post - Replies didn't read as replies to IndieWeb readers and webmention receivers: on note pages `u-in-reply-to` sat inside an unrelated `h-cite`, and the home page didn't mark replies at all, so [Post Type Discovery](https://www.w3.org/TR/post-type-discovery/) saw notes (or photo posts). The reply context is now the entry's `u-in-reply-to h-cite`, and home page entries show "↩ In reply to" +- Photos without alt text used "Image" as their description, which IndieWeb readers passed on as if you'd written it. They now use the post's text (up to 150 characters), and fall back to "Image" only when the post has no text - Home page entries always have an `e-content`, so a photo post without text never gets an implied name (which readers would show as its caption) ### Changed diff --git a/docs/design/v2.6.5/2026-11-01-micropub-media-fixes.md b/docs/design/v2.6.5/2026-11-01-micropub-media-fixes.md index 0f771f8..5b91969 100644 --- a/docs/design/v2.6.5/2026-11-01-micropub-media-fixes.md +++ b/docs/design/v2.6.5/2026-11-01-micropub-media-fixes.md @@ -62,14 +62,19 @@ the rendered pages with mf2py found: - Page title for text-free posts follows PTD order: Repost, Like, Reply, Photo. +Photos without a caption take the post's text as alt (`partials/media.html` +`fallback_alt`) instead of the made-up "Image". The Micropub `q=source` +still reports the stored caption (`""`). + `tests/test_post_types.py` parses note pages and the home page with mf2py and runs PTD for notes, articles, photo posts (no text, caption, title), replies (with and without a photo) and reposts. ## Not changed (noted for later) -- Photos without alt text render `alt="Image"`, so parsers report alt text - nobody wrote (q=source correctly returns `""`). +- Text-free photos without alt text still render `alt="Image"`. Captioned + photos use their caption, and others now use the post's text (`display_media` + `fallback_alt`, the excerpt cut to 150 characters). - More than 4 photos are still cut to 4 without an error (ADR-057). - `video` and `audio` are ignored. This is allowed by the spec, and they diff --git a/templates/note.html b/templates/note.html index 5bfd222..c111540 100644 --- a/templates/note.html +++ b/templates/note.html @@ -44,7 +44,7 @@ {# u-photo placement: Per draft spec, u-photo must be direct child of h-entry, #} {# NOT inside e-content. Media is rendered ABOVE e-content to meet this requirement. #} - {{ display_media(note.media) }} + {{ display_media(note.media, note.excerpt|truncate(150)) }} {# e-content: note content BELOW media (per ADR-057) #}