Repository navigation
Let videos take alt text on Mastodon, Bluesky, Threads and Discord - #511
Merged
Merged
Conversation
added 5 commits
November 17, 2026 12:08
The four networks document alt text on a video, but TryPost only sent it for images and the media editor only offered the Alt tab on images. - Platform::supportsVideoAltText() / ContentType::supportsVideoAltText(), shared as supports_video_alt_text in the media rules (composer, API, MCP). - Mastodon sends the media description, Bluesky the video embed alt, Threads alt_text on video containers (single and carousel), Discord the attachment description. - The media editor offers the Alt tab on those videos; AI alt generation stays image only. - The API and MCP alt shorthand now keeps alt on a video (still ignored for a PDF). Closes #507
… and guard the other networks - Platform::supportsAltText() and ContentType::supportsAltText() become supportsImageAltText(), next to supportsVideoAltText(); the public supports_alt_text key is unchanged for API and MCP clients. - editorTabsFor() reads the optional tabs of a video or an image from one list each instead of nested spreads. - Tests: every platform with video alt also takes image alt; Facebook videos and reels and Instagram reels still send no alt; editing a video's alt keeps its cover frame.
- Threads: one publishSingleMedia() for an image or a video, and mediaParams() building the type, URL and alt text for single posts and carousel children alike. - Bluesky: mediaEmbed() picks images or a video; imagesEmbed() and videoEmbed() build each, sharing one upload failure.
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.
Mastodon, Bluesky, Threads and Discord all document alt text on a video, but TryPost only sent it for images, and the media editor only offered the Alt tab on images. With this PR, every network that takes alt text on a video gets it, so images and videos are on par.
Closes #507. Split out of #310.
What each API documents
altonapp.bsky.embed.video: "Alt text description of the video, for accessibility."lexicons/app/bsky/embed/video.jsondescriptiononPOST /api/v2/media: "A plain-text description of the media, for accessibility purposes." Not limited to images; the server validates it on every media type (app/models/media_attachment.rb).alt_text: "The accessibility text label or description for an image or video in a Threads post", up to 1,000 characters.description: "description (alt text) for the file (max 1024 characters)".The other networks take no alt text on a video (X and Instagram: images only; Facebook, TikTok, YouTube, Telegram and Google Business: no field). LinkedIn and Pinterest don't document it either way, so they are left out.
Changes
Platform::supportsVideoAltText()(Bluesky, Mastodon, Threads, Discord) andContentType::supportsVideoAltText(), shared assupports_video_alt_textin the media rules (composer props,GET /api/content-types,list-content-types-tool). The image side is renamed to match (supportsAltText()→supportsImageAltText()on both enums and in the TypeScript rules); the publicsupports_alt_textkey stays as it is, so API and MCP clients see no change.editorTabsFor()reads the optional tabs of a video and of an image from one list each (VIDEO_TABS,IMAGE_TABS).descriptionon a video upload.altto the video embed (omitted when empty).alt_texton a single video container and on video carousel children.descriptionon a video.altTextFor(), as for images.altshorthand on a media item now keeps the alt on a video too (still ignored for a PDF). The tool descriptions say when it is sent.Tests
altwithout one.ContentTypeTest: only those four types take video alt; the listing carries the flag.MediaEditorPresetsParityTest: the TypeScript editor offers Alt on a video exactly where the backend takes it.InlineMediaShapeTest/AttachMediaFromUploadToolTest: thealtshorthand is kept on a video and ignored on a PDF.MediaEditorTest, one case per network): open the ALT button on a video, check no AI button, type the alt, save, and check it is stored.altTextFor()relies on for the limit.cover_offset_ms).MediaEditorTest.php(51 browser tests), Pint, ESLint and vue-tsc pass.Manual test plan
Run against real accounts on November 17, 2026. Threads, X, LinkedIn, Facebook and Pinterest are not connected in the test workspace, so their items stay open.
Video alt text, the new behaviour
media_attachments[].descriptionon the status).altis on theapp.bsky.embed.videorecord.altkey and no error.descriptionholds it.Media editor
alt_textgone from the media meta).alt_text.Things that could break (image alt and other networks)
alt_texton each child), Bluesky, Mastodon and Discord: four images, each with its own alt, all four kept in order.REELS, no alt sent, no error.API and MCP
Covered by the automated tests (
InlineMediaShapeTest,AttachMediaFromUploadToolTest,ContentTypeTest,PlatformToolTest); not run by hand.POST /api/postswith a video item carryingaltfor Mastodon: the post stores the alt on the video and publishes it.alt: the alt is ignored and the post is created.GET /api/content-types: each type carriessupports_video_alt_text(true only onbluesky_post,mastodon_post,threads_postanddiscord_message) and still carriessupports_alt_textunchanged.list-content-types-toolshows the same flag.attach-media-from-url-toolandattach-media-from-upload-toolwith a video andalt: the alt is stored on the video.