Update allowed tags/attributes from spec in amphtml 1908162134430#3084
Update allowed tags/attributes from spec in amphtml 1908162134430#3084westonruter merged 13 commits intodevelopfrom
Conversation
| 'disallowed_ancestor' => array( | ||
| 'amp-story', | ||
| ), | ||
| 'mandatory_parent' => 'body', |
There was a problem hiding this comment.
Interesting. No longer does amp-sidebar have to be directly a child of the body element. Now it is merely recommended:
<amp-sidebar>is recommended to be be a direct child of the<body>to preserve a logical DOM order (for accessibility) as well as to avoid altering its behavior by a container element. Note that having an ancestor ofamp-sidebarwith a setz-indexmay cause the sidebar to appear below other elements (such as headers), breaking its functionality.
| 'requires_usage' => 2, | ||
| 'version' => array( | ||
| '0.1', | ||
| '0.2', |
… importance/loading to noscript fallback
…ax_bytes cdata constraints
8e5754e to
0aee763
Compare
| class AMP_Allowed_Tags_Generated { | ||
|
|
||
| private static $spec_file_revision = 920; | ||
| private static $spec_file_revision = 935; |
There was a problem hiding this comment.
Where does this come from? It does not seem to be the spec version this PR refers to ( 1908162134430 ).
This is probably part of the data that is being retrieved when generating this file, but a comment as to where this is mirrored might be useful.
There was a problem hiding this comment.
This comes from the AMP validator spec: https://github.com/ampproject/amphtml/blob/dad372c5c339b07302effbea75c28eae99a7a54e/validator/validator-main.protoascii#L17-L29
As you can see, it's not actually even used anywhere. We could remove it and the $minimum_validator_revision_required variable, as they are private.
| '', | ||
| ), | ||
| ), | ||
| 'slide' => array( |
There was a problem hiding this comment.
The generator should probably be adapted to use short array syntax as well.
Previously: #3003.
./bin/amphtml-update.shUpdate spec generator as needed based on spec format changes.Modify validating sanitizer based on changes to spec, if needed.Changelog
htmlelement has thedata-ampdevmodeattribute, prevent validating any element that also has thedata-ampdevmodeattribute. This will ultimately be used to prevent removing the admin bar per Ignore admin bar for AMP validation purposes #1921 (comment). See full writeup: Integrating with AMP Dev Mode in WordPress.RecognizePass throughintrinsicsizeattribute onimgfor specifying width/height dimensions, but then omitintrinsicsizefromamp-imgsince handled by component.importance,intrinsicsize, andloadingattributes toamp-img > noscript > imgbut omit from convertedamp-imgsince also supported by component (largely).amp-sidebarbe a direct child of thebodyelement.canvasinside ofamp-script.max_bytesconstraint. Note this was previously being validated for stylesheets in the style sanitizer, but now withamp-scriptallowing inline scripts (soon) it is important to support this in the validating sanitizer.meta name=amp-script-srctag spec foramp-scriptwhich are sourced either cross-origin or inline.amp-carouselon version0.1since0.2depends on an experimentalamp-base-carousel.slideattribute toamp-carousel(apparently only relevant to0.2).amp-autocompletebe inside of aform.templateattribute toamp-date-display.AMP-LIST DIV [fetch-error]tag spec.amp-videotoamp-story-page-attachment.relattribute onlinkelements.widthandheightattributes tosymbolSVG element.Details
( PREV_VERSION=1907301630320; THIS_VERSION=1908162134430; git diff $PREV_VERSION...$THIS_VERSION -w -- $( git ls-files $THIS_VERSION -- . | grep '.protoascii' ) )Compare 1907301630320...1908162134430