A visitor scrolls to your Instagram feed, finds the post that answers their question, and clicks it. If that click replaces the page, they lose their place and any form progress they had started. Getting instagram feed embed custom link target blank rel noopener accessibility right means more than adding one attribute: you decide link behavior per goal, pair target="_blank" with rel="noopener", warn visitors before they click, keep every anchor reachable by keyboard, and confirm the feed still renders after the embed script is installed. This guide walks through that sequence and ends with a test you can run before launch.
Decide link behavior per goal before touching markup
There is no single correct answer for every link in a feed. Sort your links into groups first, then apply the simplest rule that satisfies all of them.
- On-page navigation stays in the same tab. An in-page jump or a link to another page of your own site should behave like normal navigation. New tabs for same-tab moves are disorienting.
- Off-site destinations open in a new tab. A link to an Instagram profile or a single post leaves your site. Opening it in a new tab preserves the visitor's reading position and any half-finished form.
- One rule is often simplest. If every item in the feed points off-site, apply the new-tab treatment uniformly. Mixed behavior inside one grid makes a click unpredictable.
Write the rule down before you configure anything: "All feed links are off-site, so all open in a new tab and carry an external cue." That sentence gives your editor, developer and QA tester the same thing to check.
The markup basics: target, rel and what each part does
The anchor is where the behavior lives. Pair every target="_blank" with rel="noopener" so the new page cannot reach back into yours through window.opener. Add noreferrer only if you also want to suppress referrer information; that is a separate privacy decision, not part of the safety pair.
<a href="https://www.instagram.com/p/example-post/"
target="_blank"
rel="noopener"
class="feed-link">
View this post on Instagram
<span class="external-cue" aria-hidden="true">↗</span>
</a>
Three details matter here:
rel="noopener"is not optional. It is the security half of the pattern. Modern browsers imply it for_blank, but writing it explicitly documents intent and protects older engines.- The visible cue is decorative. The arrow span carries
aria-hidden="true"so screen readers do not announce a stray character, while sighted visitors still get the warning. - The link text must stand alone. "View this post on Instagram" is meaningful out of context. When a screen reader user pulls up a list of links on the page, "click here" and "read more" are not.
If your widget renders anchors from settings rather than hand-written HTML, open DevTools after publishing and inspect the output. The attributes must be on the anchor that actually reaches the browser, not only in your configuration notes.
Tell visitors before they click
An unannounced new tab is a small ambush. Fix it with two channels: something visible next to the link, and a name that carries the outcome.
Visible cue. A short external-link icon or the words "(opens in a new tab)" beside the link satisfies the visual channel. Keep it consistent across feed items so it reads as a pattern rather than noise.
Accessible name. Screen reader users benefit from hearing the result before activation. Extend the link text, or add visually hidden text inside the anchor:
<a href="https://www.instagram.com/p/example-post/"
target="_blank"
rel="noopener"
class="feed-link">
View this post on Instagram
<span class="visually-hidden"> (opens in a new tab)</span>
<span class="external-cue" aria-hidden="true">↗</span>
</a>
For posts rendered as images, the same care applies to alternative text. MDN's reference on the img element and its alt attribute explains that alt text substitutes for the image when it cannot be displayed and is reused when an image is copied or bookmarked, so describe the destination instead of repeating the visible label. Our guide to Instagram feed alt text and captions accessibility splits alt text from captions in more depth, and Instagram feed alternative text from post captions covers the case where descriptions come straight from captions. Whatever you choose, do not announce the new tab three times: if the visible link already says it, do not repeat the phrase in a hidden span and again in alt text.
Keyboard and screen reader test script
Run this on the published page, not in the editor preview.
- Tab from the top of the page until focus reaches the first feed link. Confirm the focus indicator is visible against the feed background.
- Listen to the announcement. It should include the link purpose and the new-tab warning, and nothing extra.
- Press Enter and confirm the destination opens in a new tab rather than replacing the page.
- Return to the feed tab, press Shift+Tab, and confirm focus lands on the previous element rather than jumping to the top of the document.
- Tab through every remaining feed link. Watch for a link that cannot receive focus at all, which usually means a wrapper with a click handler instead of a real anchor.
- If a feed item opens a lightbox rather than navigating, treat it as a dialog. The W3C Dialog (Modal) Pattern requires Tab and Shift+Tab to stay within the dialog, Escape to close it, and focus to return to the invoking element when it closes. A lightbox that breaks those rules is a focus trap; our Instagram feed modal lightbox accessibility guide covers the fixes.
- Repeat steps 1 to 5 with a screen reader running, and once more on a phone with a Bluetooth keyboard if that reflects your audience.
If the widget defers its iframe until interaction, the same script applies but the placeholder comes first. Name the placeholder and title the frame so the region makes sense before content loads; Instagram feed embed lazy loading iframe title accessibility shows the naming pattern.
Common breakage and how to spot it
- Links that swallow clicks. A card overlay or pseudo-element on top of the anchor intercepts the click. Tab to the link and press Enter: if nothing happens but a mouse click works, the anchor is not the topmost target.
- Placeholders that shift layout when the feed loads. Reserve the feed box with width and height or an aspect ratio so the page does not reflow and move a link out from under a pointer mid-click. MDN notes that including
heightandwidthlets the browser compute the aspect ratio before the image loads, reducing layout shift. Our Instagram feed placeholder layout shift fix walks through the reservation step by step. - Alt text that duplicates the link label. When the image is the link, screen readers announce both. Write alt text about the destination, or leave it empty when adjacent text already names the link.
- Behavior that changes on mobile. Confirm the new-tab attributes survive whatever script renders the feed at small widths.
Pre-launch checklist
- Every off-site feed link has
target="_blank"andrel="noopener"in the rendered DOM. - Each link has a visible external cue and an accessible name that states the outcome once, not twice.
- Decorative icons are hidden from assistive technology; the link text alone is meaningful.
- Tab order reaches every link, nothing intercepts clicks, and no focus trap exists outside a proper dialog.
- The feed box holds its space, so CLS stays flat while the widget loads.
- You captured an LCP baseline before the embed and re-measured afterwards. Google's guide to optimizing Largest Contentful Paint states that a good LCP is 2.5 seconds or less for at least 75% of page visits and recommends judging with real-user data rather than a single lab trace, so compare CrUX or RUM numbers. Instagram Feed Lazy Loading Performance: Fix LCP and CLS shows the before-and-after routine.
- The feed still renders after the WidgetJar embed script is installed on the registered domain, on desktop and mobile.
Ready to ship a feed that behaves
Link behavior is one of several accessibility details a feed needs, but it is the one visitors feel most sharply, because it decides whether they keep their place. Configure the feed in the WidgetJar panel, attach your destinations, publish, and run the keyboard script above before launch. When you are ready, start with the Instagram feed widget and check its layout and link settings against the checklist in this article.