fix: Photos without alt text use the post's text (v2.6.5)
Uncaptioned photos rendered alt="Image", which mf2 parsers report as the photo's alt text. They now take the post's text (excerpt, up to 150 characters), falling back to "Image" only for text-free posts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a551770c76
commit
4ffe36f9d3
6 files changed
+27
-6
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user