[Story Player] AMP validator failures for <amp-story-player> for responsive layout
See original GitHub issueGiven this amp-story-player
example, which is taken from the docs but replacing fixed
with responsive
:
<amp-story-player layout="responsive" width="360" height="600">
<a
href="https://preview.amp.dev/documentation/examples/introduction/stories_in_amp/"
style="--story-player-poster: url('https://amp.dev/static/samples/img/story_dog2_portrait.jpg')"
>
Stories in AMP - Hello World
</a>
</amp-story-player>
If an amp-story-player
is transformed via the Node.js AMP Optimizer, the result is this:
<amp-story-player layout="responsive" width="360" height="600" class="i-amphtml-layout-responsive i-amphtml-layout-size-defined" i-amphtml-layout="responsive">
<i-amphtml-sizer style="display:block;padding-top:166.6667%;"></i-amphtml-sizer>
<a href="https://preview.amp.dev/documentation/examples/introduction/stories_in_amp/" style="--story-player-poster: url('https://amp.dev/static/samples/img/story_dog2_portrait.jpg')"> Stories in AMP - Hello World </a>
</amp-story-player>
This results in another validation error:
Tag 'i-amphtml-sizer' is disallowed as child of tag 'amp-story-player'. Child tag must be one of ['a'].
See example in AMP Playground.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Integrate stories in AMP pages
The AMP Story Player enables you to integrate stories that users are able to tap or click through, inside of a web page....
Read more >Amp-img ALT problems with “” | WordPress.org
When I examine the Console error, I see that the AMP plugin is causing the problem. There is a mismatch caused by the...
Read more >Newest 'amp-story' Questions - Stack Overflow
I am using AMP story player but it is not autoplay bydefau it. Even I set autoplay is true. It works when I...
Read more >AMP Stories: Everything You Need To Know (Complete Guide)
With AMP Stories, Google is offering a beautiful place at the top of ... the AMP validator and report if the page passes...
Read more >amp-iframe examples and tricks
Embedding iframes in AMP As we talked before, Accelerated Mobile pages of AMP ... AMP layouts provided as values to its layout attribute:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Specifically, it accounts for the
responsive
layout but not theintrinsic
one. In theresponsive
layout, the sizer looks like:Whereas in the
intrinsic
layout, the sizer looks like:I’ll open a new issue specifically for the intrinsic layout.
cc @ampproject/wg-caching @pbakaus @swissspidy