# Accessibility fix: LinkedIn feed traps the screen reader in non-visible posts

**URL:** <https://community.elfsight.com/t/accessibility-fix-linkedin-feed-traps-the-screen-reader-in-non-visible-posts/168148>\
**Category:** General Questions\
**Tags:** linkedin-feed\
**Created:** [July 15, 2026, 8:25am UTC](https://community.elfsight.com/t/accessibility-fix-linkedin-feed-traps-the-screen-reader-in-non-visible-posts/168148 "2026-07-15T08:25:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pb\_j\_General](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/pb_j_general/32/102636_2.png) [@pb\_j\_General](https://community.elfsight.com/u/pb_j_General)\
**Post date:** [July 15, 2026, 8:25am UTC](https://community.elfsight.com/t/accessibility-fix-linkedin-feed-traps-the-screen-reader-in-non-visible-posts/168148/1 "2026-07-15T08:25:33Z")

</div>

**Description:**

The LinkedIn feed keeps its off-screen posts in the accessibility tree, so the screen reader reads posts that are not visually displayed and cycles through the entire feed. The user cannot easily move past the section.

**Why it matters:**

1. The screen reader reads content that is not on screen, so what is heard does not match what is shown.

2. The user gets stuck cycling through every post and cannot skip the section to reach the rest of the page.

**How to fix it:**

1. Hide off-screen posts from assistive tech (aria-hidden=“true” on non-visible slides) and remove them from the tab order, so only visible posts are read.

2. Provide a way to skip the feed, or limit how many posts are exposed at once.

3. Since this is an Elfsight widget, this likely means adjusting its configuration, requesting a fix from the widget, or replacing it with a more accessible feed.

WCAG criteria it fails:

1. 1.3.1 Info and Relationships (A, 2.0), because content that is not visually present is exposed to assistive tech.

2. 2.4.3 Focus Order (A, 2.0) if the off-screen posts are also keyboard-focusable, which you can check in the focus pass.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [July 15, 2026, 8:30am UTC](https://community.elfsight.com/t/accessibility-fix-linkedin-feed-traps-the-screen-reader-in-non-visible-posts/168148/3 "2026-07-15T08:30:35Z")

</div>

Hi there, @pb_j_General 👋

Thanks a lot for flagging this up!

I’ve passed this info on to the devs and will update you once I have their response 🙂

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [July 16, 2026, 6:00pm UTC](https://community.elfsight.com/t/accessibility-fix-linkedin-feed-traps-the-screen-reader-in-non-visible-posts/168148/4 "2026-07-16T18:00:25Z")

</div>

Hello @pb_j_General 👋

Our devs came up with a custom solution for you! Please add this code to the **Custom CSS** field on the **Settings** tab of your widget’s settings:

```auto
[class*='CardContainer-sc']:focus-visible {
	outline: 2px #2481FF solid !important;
}
.es-carousel-arrow-control-container:focus-visible {
	outline: 2px #2481FF solid !important;
	border-radius: 50%;
}
.es-carousel-layout-item {
	padding: 2px;
}

```

  

And this script should be placed in the **Custom JS** field on the **Settings** tab:

```auto
util.waitForElement('.swiper-wrapper').then((swiper) => {
	const postsObserver = new MutationObserver(() => {
		const visiblePosts = swiper.querySelectorAll(
			'.swiper-slide-visible [class*="CardContainer-sc"]'
		);

		const posts = swiper.querySelectorAll('[class*="CardContainer-sc"]');

		posts.forEach((post) => {
			post.tabIndex = -1;

			const focusable = post.querySelectorAll(
				'a, button, input, textarea, select, [tabindex]'
			);

			focusable.forEach((el) => {
				el.tabIndex = -1;
			});
		});

		visiblePosts.forEach((post) => {
			post.tabIndex = 0;
			post.setAttribute('aria-label', 'View post on LinkedIn');
			post.setAttribute('role', 'link');

			if (!post.dataset.keyboardReady) {
				post.dataset.keyboardReady = 'true';
				post.addEventListener('keydown', (e) => {
					if (e.key === 'Enter' || e.key === ' ') {
						e.preventDefault();
						post.click();
					}
				});
			}
		});

		const navButtons = swiper
			.closest(`.es-carousel-outer`)
			.querySelectorAll('.es-carousel-arrow-control-container');

		navButtons.forEach((btn) => {
			const isHidden = btn.getAttribute('aria-hidden') === 'true';
			btn.tabIndex = isHidden ? -1 : 0;
			btn.setAttribute('role', 'button');

			if (isHidden && btn.contains(document.activeElement)) {
				btn.blur();
			}

			if (!btn.dataset.keyboardReady) {
				btn.dataset.keyboardReady = 'true';
				btn.addEventListener('keydown', (e) => {
					if (e.key === 'Enter' || e.key === ' ') {
						e.preventDefault();

						const target = btn.querySelector(':scope > :first-child');
						target?.click();
					}
				});
			}
		});
	});

	postsObserver.observe(swiper, {
		childList: true,
		subtree: true,
		attributes: true,
		attributeFilter: ['class'],
	});
});

```

  

Test it out and let me know if it helped 🙂
