amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

AMP Story bookend mouseover title

Open AutadeJS opened this issue 8 years ago • 3 comments

In bookend, when you mouseover a link or thumbnail image, a title pups up. It's same for all the links.

AutadeJS avatar Aug 22 '18 15:08 AutadeJS

Looks like this is because amp-story 1.0 has the mandatory title attribute, and the browser is using any ancestor's title on the elements in the bookend, since title is a default global HTML attribute. We can strip the metadata at build time and store it in memory.

newmuis avatar Aug 22 '18 16:08 newmuis

Are we doing anything specific in amp-story that brings this behavior?

This doesn't repro:

<html>
  <head>
    <title>Should see this as a title when hovering the link</title>
  </head>
  <body>
    <a href="https://example.com">Hover me</a>
  </body>
</html>

gmajoulet avatar Sep 07 '18 21:09 gmajoulet

It's the title attribute in the <amp-story> metadata, rather than the <title> tag on the page that causes this.

newmuis avatar Sep 07 '18 22:09 newmuis