Most embedded Instagram feeds arrive with two pieces of text: an image and a caption. Neither is automatically useful as alternative text. When you build instagram feed embed alt text from post captions, the real task is deciding, for every post, which text becomes the image's alternative and which stays visible, so a screen reader user hears each post exactly once instead of twice.
This guide gives you that decision rule, a caption-trimming method, correct image markup, and a keyboard plus screen reader test you can run before launch. It assumes a feed is already rendering. If you are starting from scratch, begin with how to embed an Instagram feed on your website, then return here to make it readable.
Why alt text on an embedded feed matters more than it looks
The alt attribute is the text that replaces the image when the image cannot be perceived at all. The MDN reference for the img element explains that browsers may not display images for several reasons — non-visual browsers, a user choosing not to load images, an invalid or unsupported file — and in those cases the browser may substitute the alt text. That is the whole argument in one sentence: alt text is not a screen reader nicety added at the end; it is the fallback the image needs to survive any of those conditions.
A caption is not alt text. Captions carry hashtags, handles, emoji, calls to action and voice. Alt text describes what the image shows in a sentence or two. If you paste the caption into alt verbatim, three things usually go wrong: the description is diluted with marketing noise, the visible caption and the alt text say the same thing twice inside one link, and a long caption produces an exhausting announcement.
There is also an accuracy argument. Alt text is the one place where you control how the post is described, so it must be true. If the caption says "New drop Friday" and the photo is a flat-lay of three garments, the alt text should describe the flat-lay; the date belongs in the visible caption.
Decide the text source for each post, in priority order
Use a fixed cascade so behaviour is predictable and reviewable post by post:
- Author-provided alt text, if it exists. If the post already has a description, use it unchanged. Do not append the caption to it.
- Otherwise, a trimmed caption. Not the raw caption — a trimmed version, described below.
- Otherwise, a neutral fallback. Something like "Instagram post from [account name]". Never leave
altmissing, and never let the fallback pretend to describe content you have not seen.
Write this rule where the person configuring the feed can read it. The most common failure is a team applying rule 2 to every post, including ones that already have good descriptions, which then get duplicated.
Trim a caption into usable alt text
Treat the caption as raw material, not finished text. A workable pass:
- Keep the meaningful sentence. Usually the first sentence, or the clause that describes the subject.
- Drop hashtags. They are findability, not description.
- Drop @handles. A screen reader reads them awkwardly and they add nothing to the image description.
- Collapse emoji runs. One emoji may be meaningful; a row of twelve is noise.
- Drop calls to action and link-in-bio phrasing. "Tap the link" is an instruction, not a description.
- Cap the length. Two sentences is generous. If the caption is longer, describe rather than transcribe.
A before-and-after shows the shape of it:
Caption: Fresh sourdough out of the oven 🥖🔥 Order by Thursday for
weekend pickup! Link in bio. #sourdough #bakery #localbread
Alt text: Loaf of sourdough bread on a cooling rack, crust cracked
along the top, next to a linen cloth.
Notice that the alt text describes the photograph, while the pickup deadline stays in the visible caption. That division is what keeps the two from competing.
The trimming step needs a home in your workflow. If you hand-edit HTML, do it in the same commit as the embed. If you configure the feed in the WidgetJar panel after installing the embed script on your registered domain, record the source rule in your content notes so the next person does not silently switch back to untrimmed captions.
Avoid double announcements between alt text and caption
If the image and the caption sit inside one link, and both carry the same wording, a screen reader user hears it twice. Decide which layer owns the text:
- Image-led link: the image is the only content in the link, so its
altbecomes the link's accessible name. Keep the visible caption outside the link, or ensure the link's name does not repeat it. - Card link: the whole card is one link. Give the image an empty
alt(decorative in that context) and let the visible caption provide the name. The caption is already on screen and already readable.
What you should never ship is a single link whose accessible name is a caption followed by alt text saying the same thing in different words. That is the duplicate-announcement bug in its most common form, and it is invisible if you only look at the page.
This is a narrower question than the broader caption-visibility decisions; the layout trade-offs live in the Instagram feed layout options guide, which is worth reading if a single post or carousel better fits your page than a grid.
Write the img element correctly
Three rules cover most of it:
- Meaningful
altwhen the image carries content. Describe what is visible, in plain language. - Empty
alt=""when the image is purely decorative — for example, a duplicate thumbnail inside a caption-led card. MDN notes that an empty value tells non-visual browsers the image is not a key part of the content and may be omitted from rendering, and that visual browsers hide the broken-image icon. - No text baked into filenames or
title.photo-2-final-v3.jpgis not a description, andtitletooltips are not a reliable alt substitute.
<!-- image carries the meaning; link name comes from alt -->
<a href="/post/123">
<img src="sourdough.jpg"
alt="Loaf of sourdough bread on a cooling rack, crust cracked along the top."
width="400" height="400" loading="lazy">
</a>
<!-- card carries the meaning; image is decorative inside the card -->
<a href="/post/124">
<img src="sourdough-2.jpg" alt="" width="400" height="400" loading="lazy">
<span class="caption">Weekend pickup is open — order by Thursday.</span>
</a>
The width and height attributes do double duty. MDN points out that including both lets the browser compute the aspect ratio before the image loads, which reserves space and reduces layout shift. That is the same concern covered in the Instagram feed placeholder layout shift fix; in practice it means your trimmed alt text does not jump around while someone is hearing it read.
Label the feed container and each post link
Out of context, "view post" and "open" tell a screen reader user nothing. Give the feed a labelled region and make each link name distinguishable:
- Wrap the feed in a region with an accessible name such as "Instagram feed" so it can be reached from a landmark list.
- Build each post link's name from something specific — the account, the date, or a short subject — not just "post".
- If the post opens a lightbox, the dialog needs its own name. The W3C ARIA Authoring Practices modal dialog pattern sets the baseline: the container has
role="dialog",aria-modal="true", and eitheraria-labelledbypointing at a visible title or anaria-label; when the dialog closes, focus returns to the element that invoked it.
That last clause is the one people skip. If the lightbox returns focus to the top of the page instead of the post that opened it, a keyboard user has lost their place in a grid of twenty images.
Test with a keyboard first
Keyboard testing catches structure problems before you start listening.
- Click into the browser chrome, then Tab until focus reaches the feed. Confirm the region is reachable and the focus ring is visible against the images.
- Tab through each post. Every post should be one stop, not three (image, caption, icon).
- Press Enter on a post that opens a lightbox. Confirm focus moves inside the dialog.
- Tab and Shift+Tab inside the dialog. Focus should cycle within it and not escape to the page behind.
- Press Escape. The dialog closes and focus lands back on the post you opened.
- Tab forward once more. You should continue past that post, not restart the grid.
If step 5 fails, stop and fix it before the screen reader pass; the fix is the same one the ARIA pattern describes, and re-testing afterwards is cheap.
Then test with a screen reader
Listen to the feed as a user would, without looking at the page:
- Feed region: announced with its name when you reach the landmark.
- Each post: announced once. If you hear the caption and then the same idea repeated as the image description, you have the duplication bug.
- Link names: specific enough to tell posts apart without seeing the thumbnails.
- Lightbox: announced as a dialog with a name, and the description is not read twice on open.
- Return: after closing, the next announcement should place you at the post, not the page top.
Try it with images blocked, too. That is the scenario MDN describes where the browser substitutes alt, and it is a fast way to see whether your descriptive text does the job on its own.
Pre-launch checklist
- Every post has either author-provided alt text, a trimmed caption, or a documented neutral fallback.
- Hashtags, handles, emoji runs and CTAs are stripped from alt text.
- No link announces the same wording twice from caption and image.
- Decorative thumbnails use
alt=""; meaningful images have a real description. - The feed region has an accessible name and each post link is distinguishable.
- The lightbox is a named dialog and returns focus to the exact post.
- Keyboard Tab order visits each post once and the focus ring is visible.
- A screen reader announces each post once and the dialog once.
-
widthandheightare set so space is reserved and nothing shifts while you read.
Run this list on the live page, not in a design tool. If you maintain several embeds, keep the list next to your install notes; the accessible popup keyboard and focus checklist follows a similar shape if you want consistent QA across widgets.
Putting it together
The method is small: choose a text source per post, trim the caption to a description, assign the alternative to exactly one layer, and verify by keyboard and ear. That gets you alt text derived from captions that reads like a description instead of a transcript, and a feed that behaves sensibly when images do not load.
When you are ready to apply it, configure the feed in the WidgetJar Instagram feed widget, add the embed script to your registered domain, and walk the checklist above on the published page before you call it done.