A4a format spec#4263
Conversation
extensions/amp-a4a/amp-a4a-format.md
Outdated
| 1. Media: Videos must not enable autoplay. | ||
|
|
||
| _Rationale_: Autoplay forces video content to be downloaded immediately, which | ||
| slows the page load. Further, users dislike auto-playing video ads. |
There was a problem hiding this comment.
can we remove users dislike bit.. until we can link to any corresponding research?
extensions/amp-a4a/amp-a4a-format.md
Outdated
| ## A4A Format Rules | ||
|
|
||
| 1. The creative must obey all rules given by the [AMP format rules](../. | ||
| ./spec/amp-html-format.md), included here by reference. _*In addition*_: |
There was a problem hiding this comment.
This is technically not accurate, since we modify the usual rule set (e.g. change the boilerplate), not just add further restrictions to it.
There was a problem hiding this comment.
Good catch! Added some exception wording to this section. PTAL.
| Note that the same rules about mutations to the boilerplate text apply as in | ||
| the [general AMP boilerplate](https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md). | ||
|
|
||
| ### CSS |
There was a problem hiding this comment.
Perhaps touch-action should also be prohibited to ensure ads can't interfere with the ability to scroll the document?
There was a problem hiding this comment.
Added a restriction on touch-action. @RByers -- please check for correctness and make sure the rationale is right?
There was a problem hiding this comment.
Sorry for the delay, just got back from vacation. LGTM
| } | ||
| ``` | ||
|
|
||
| **Bad** |
There was a problem hiding this comment.
-No vendor prefixed
Blacklist vendor-prefixes in the css completely. (-webkit-, -moz-, etc)
There was a problem hiding this comment.
Sounds plausible to me, but, again, not enough CSS knowledge. Can you provide a rationale? And maybe some feedback from one of the CSS-knowledgeable AMP folks -- @dvoytenko ? Also @Gregable for feasibility of implementing the necessary validation checks? (I'd guess not too hard, but I don't want to assume with no knowledge.)
There was a problem hiding this comment.
Yes, blacklist vendor prefixes. We can insert them as needed.
There was a problem hiding this comment.
Oh shoot. I missed this one on my second pass. There was some other discussion of this in a separate email thread. I'll copy the key points here:
@powdercloud said:
The spec does not talk about vendor specific prefixes, e.g., -moz-transition or -webkit-
transition. I think there's more than one way to handle these. E.g.:
(1) Disallow any vendor prefixes for transition, animation, transform, visibility, opacity.
(2) Consider -moz-foo an alias for foo, that is, strip the vendor specific prefixes for the purpose of validation.
(3) Just ignore the issue.Opinions?
My random thoughts:
(1) may be nice if these prefixes were only useful until every browser supported the non-prefixed stuff. And it may not be good to have stylesheets that differentiate between vendors since the CSS is already constrained to be simple/fast for the ads.
(2) is perhaps the most flexible, slightly more complicated than (1) - not much really.
(3) is bad because -webkit-transition may be a backdoor for when transition isn't allowed.I think my default choice may be (2).
And then @cramforce said:
Yes, (2), please :)
It sounds like the folks working on validator code went with approach 2, and I think it meets the needs expressed here. So I'll add it to the doc.
extensions/amp-a4a/amp-a4a-format.md
Outdated
| <tr><td>amp-kaltura-player</td></tr> | ||
| <tr><td>amp-lightbox</td></tr> | ||
| <tr><td>amp-list</td></tr> | ||
| <tr><td>amp-live-list</td></tr> |
There was a problem hiding this comment.
Does live-list make sense in an ad? Are the ads contents going to be updating over time?
There was a problem hiding this comment.
Not sure. This list came from @lannka -- hopefully he can comment on whether this is a needed feature. In general, though, I'd rather ban things that are clearly problematic, rather than things that are only questionably useful. Who knows what some clever advertiser will come up with to do with these? So unless you think live-list causes problems, I'm inclined to leave it.
extensions/amp-a4a/amp-a4a-format.md
Outdated
|
|
||
| _*In addition*_: | ||
|
|
||
| 1. The creative must use `<html a4⚡>` or `<html a4amp>` as its enclosing tags. |
There was a problem hiding this comment.
amp4ads fits better with our external comms, so far. Maybe ⚡4ads, too? Or just⚡ads.
There was a problem hiding this comment.
Oh ugh. One missed TLA expansion and suddenly we're baked into the wrong interpretation. Personally, I'd rather change the external comms going forward -- there will be another round when A4A goes live, I'm sure. And we've all tried to be consistent about usage in this doc and everywhere in GitHub. It would be a pain to change all of it now.
Maybe someone who handles external comms could comment? Hey @jasti -- do you know who the right people to loop in are? The issue is that A4A is intended to mean "AMP Ads for AMPHTML Pages". But in the initial round of external comms (starting with @cramforce 's blog post), it was expanded to "AMP for Ads". So now @bobcassels and @taymonbeal are suggesting that we should change the formatting rules in this spec to match the "AMP for Ads" interpretation. I'm reluctant to do so.
There was a problem hiding this comment.
Missed this. Quite true that although our initial focus was AMP Ads for AMP documents, it's certainly a huge focus for the quarter, according to @michaelkleber @lannka and @cramforce (see a note above from him, too).
If it's not terribly uncomfortable, we should switch to calling it AMP for Ads now OR we can wait until we are done with the work to cleanly support AMP ads outside of AMP documents and then revise the docs. (which I think we are aiming for the end of the quarter). Your call.
There was a problem hiding this comment.
Ok, you all win. :-) A4A == AMP for Ads. Changed this doc. We'll have to look out for other points to change as well.
There was a problem hiding this comment.
Note to @Gregable : Validator will have to change to match new html spec.
|
PR #4773 adds the ability for the href of an anchor within the creative to expanded on click allowing for capture of click X/Y, in addition to other expansion macros. One concern is that when the creative has been injected within a shadow root, this would allow for leaking page level information to the creative (e.g. DOCUMENT_REFERRER, PAGE_LOAD_TIME, TOTAL_ENGAGED_TIME, etc). There are a couple of ways to handle this:
I propose item 1 for now and we can move some macros over as the need arises. Should I include this as part of the PR or wait until it is completed and then add? |
extensions/amp-a4a/amp-a4a-format.md
Outdated
| Feedback from the community is welcome. Please comment here or on the [Intent | ||
| to Implement](https://github.com/ampproject/amphtml/issues/4264)_. | ||
|
|
||
| A4A (AMP Ads for AMPHTML Pages) is a mechanism for rendering fast, |
There was a problem hiding this comment.
I, uhm, prefer "AMP for Ads.". I think this spec has wider scope as it largely applies to non-AMP containers.
There was a problem hiding this comment.
Fair enough. I guess this is a lost fight now. :-) Updated.
|
@keithwrightbos Re: click handling and anchor expansion. As I think about it, I'm not sure this doc is the best place to describe that. Maybe it should be described in detail in the variable substitions documentation and only mentioned here, with a cross-link? My rationale is that people looking to implement variables in their hrefs will be looking there first. A lot also depends on whether it's a full validation error to have a disallowed parameter, or it simply gets silently ignored (possibly b/c the validation service silently rewrites it away). My inclination is to go for silent ignore, instead of invalidate page. |
…e unbounded resources) and one that only works at page level.
| should not attempt to include them directly. | ||
|
|
||
| <table> | ||
| <tr><td>amp-accordion</td></tr> |
There was a problem hiding this comment.
Lets trim to
+ <tr><td>amp-accordion</td></tr>
+ <tr><td>amp-analytics</td></tr>
+ <tr><td>amp-anim</td></tr>
+ <tr><td>amp-audio</td></tr>
+ <tr><td>amp-carousel</td></tr>
+ <tr><td>amp-fit-text</td></tr>
+ <tr><td>amp-font</td></tr>
+ <tr><td>amp-form</td></tr>
+ <tr><td>amp-img</td></tr>
+ <tr><td>amp-pixel</td></tr>
+ <tr><td>amp-social-share</td></tr>
+ <tr><td>amp-video</td></tr>These are also cut for now until we properly support them:
+ <tr><td>amp-image-lightbox</td></tr>
+ <tr><td>amp-lightbox</td></tr>
There was a problem hiding this comment.
Done. Again, @jasti to double-check from a product perspective, but I'm okay with this list.
There was a problem hiding this comment.
Thanks, looks like a good start.
|
LGTM from my side. Let me know when this should land. |
|
@cramforce I think this is pretty stable now. All outstanding comments are addressed, as far as I can see. As @keithwrightbos mentions, there are some further issues that we need to discuss around URL variable substitution, but we've not yet settled how that will be handled, so we'd prefer to get this draft published and then iterate on future revisions. So I'm happy for you to go ahead and merge / publish this. Thanks! |
This is a draft specification for the format of A4A ad documents (a.k.a., "A4A creatives").