Update amphtml validator spec to v1907301630320 #3003
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously: #2816.
./bin/amphtml-update.sh
Update spec generator as needed based on spec format changes(see Add support for mandatory_oneof and mandatory_anyof attribute constraints #938)Modify validating sanitizer based on changes to spec, if needed(see Add support for mandatory_oneof and mandatory_anyof attribute constraints #938)Todos specific to this update:
responsive
layout foramp-soundcloud
.AMP_Block_Sanitizer
removes classes likewp-embed-aspect-16-9
, have it push the width and height onto the child element if it haslayout=responsive
.Changelog
amp-ad
withtype=custom
allow-blocked-end-date
attribute toamp-date-picker
.template
attribute fromamp-embed
.tabindex
attribute regex constraint (as integer) foramp-iframe
.amp-soundcloud
. See Improve Soundcloud embed: support playlists, preserve visual/height params, include fallback content #2722 which now needs revisiting to implementresponsive
layout. See below.amp-script
:sandbox
attribute.unique
constraint foramp-script
, so you can now use multiple scripts on a page.script
attribute which contains the ID for ascript[type=text/plain]
on the page containing the JS to run, except this is temporarily disabled: https://github.com/ampproject/amphtml/blob/1907301630320/extensions/amp-script/validator-amp-script.protoascii#L27-L56mandatory
constraint forsrc
attribute, since thescript
can soon be defined inline via thescript
attribute.position
attribute (value being eitherlandscape-half-left
orlandscape-half-right
) toamp-story-grid-layer
. See Support for landscape orientation #2409.poool-access-content
andpoool-access-preview
attributes to thesection
element.SoundCloud Embed Layout
This is revisiting #2722 since
amp-soundcloud
now supportslayout=responsive
per ampproject/amphtml#23144.Before
Only
layout=fixed-height
was supported, resulting in squished-looking embeds:After
Now with
layout=responsive
, the embed looks identical to the non-AMP version, including the preservation of the aspect ratio defined by the block class name:Details
Compare 1907022322580...1907301630320