astro-embed icon indicating copy to clipboard operation
astro-embed copied to clipboard

Lighthouse: Links are not crawlable with `<YouTube>`

Open jrouleau opened this issue 10 months ago • 3 comments

Introduced by https://github.com/delucis/astro-embed/pull/102

The play button is now an <a> elements that has its href attribute removed thereby creating the following issues with Lighthouse scores:

Links are not crawlable

Search engines may use href attributes on links to crawl websites. Ensure that the href attribute of anchor elements links to an appropriate destination, so more pages of the site can be discovered. Learn how to make links crawlable

jrouleau avatar Apr 10 '24 21:04 jrouleau

Thanks for the issue! I noticed this as an accessibility problem too: links without href are not focusable, so the play button can’t be reached with the keyboard.

I think this will need fixing in https://github.com/paulirish/lite-youtube-embed which we depend on — maybe by replacing the link with a button when present.

delucis avatar Apr 10 '24 21:04 delucis

Update: have a fix on a local branch. Will open an upstream PR tomorrow.

delucis avatar Apr 10 '24 22:04 delucis

Opened a PR here: https://github.com/paulirish/lite-youtube-embed/pull/177

Let’s see if we get a response and if not we can look to revert the progressive enhancement pattern in astro-embed or use my fork of lite-youtube-embed.

delucis avatar Apr 11 '24 10:04 delucis

Potentially off-topic, but it'd be great if the youtube component survived RSS webpage content feed reader sanitization.

Youtube component is totally stripped from article

image

Youtube embed is visible on the raw webpage

image

I think a fallback might be needed?

jasikpark avatar Jul 02 '24 00:07 jasikpark

@jasikpark I think that’s unrelated — see #59

Depends a bit how you’re rendering the RSS feed I suspect.

delucis avatar Jul 02 '24 09:07 delucis

hey, any progress here? pagespeed image

ARkrOSClou avatar Jul 15 '24 04:07 ARkrOSClou

@jasikpark I think that’s unrelated — see #59

Depends a bit how you’re rendering the RSS feed I suspect.

For me, this is the https://feedbin.com service ingesting the regular html of the webpage, since I don't render my RSS with content included, since I use Markdoc and need to sort out how to use the Container API with that still

jasikpark avatar Jul 15 '24 04:07 jasikpark

hey, any progress here? pagespeed image

x2 here! waiting for the fix

LeFede avatar Jul 31 '24 01:07 LeFede

Fixed in the latest release of @astro-community/astro-embed-youtubev0.5.3.

delucis avatar Aug 11 '24 11:08 delucis