-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update allowed tags/attributes from spec in amphtml 1908162134430 #3084
Conversation
@@ -4796,7 +4812,6 @@ class AMP_Allowed_Tags_Generated { | |||
'disallowed_ancestor' => array( | |||
'amp-story', | |||
), | |||
'mandatory_parent' => 'body', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-sidebar
with a setz-index
may cause the sidebar to appear below other elements (such as headers), breaking its functionality.
@@ -12197,6 +12374,7 @@ class AMP_Allowed_Tags_Generated { | |||
'requires_usage' => 2, | |||
'version' => array( | |||
'0.1', | |||
'0.2', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is suppressed by c93cb0b.
… importance/loading to noscript fallback
…ax_bytes cdata constraints
8e5754e
to
0aee763
Compare
@@ -13,7 +13,7 @@ | |||
*/ | |||
class AMP_Allowed_Tags_Generated { | |||
|
|||
private static $spec_file_revision = 920; | |||
private static $spec_file_revision = 935; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -1857,6 +1856,9 @@ class AMP_Allowed_Tags_Generated { | |||
'', | |||
), | |||
), | |||
'slide' => array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generator should probably be adapted to use short array syntax as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously: #3003.
./bin/amphtml-update.sh
Update spec generator as needed based on spec format changes.Modify validating sanitizer based on changes to spec, if needed.Changelog
html
element has thedata-ampdevmode
attribute, prevent validating any element that also has thedata-ampdevmode
attribute. 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 throughintrinsicsize
attribute onimg
for specifying width/height dimensions, but then omitintrinsicsize
fromamp-img
since handled by component.importance
,intrinsicsize
, andloading
attributes toamp-img > noscript > img
but omit from convertedamp-img
since also supported by component (largely).amp-sidebar
be a direct child of thebody
element.canvas
inside ofamp-script
.max_bytes
constraint. Note this was previously being validated for stylesheets in the style sanitizer, but now withamp-script
allowing inline scripts (soon) it is important to support this in the validating sanitizer.meta name=amp-script-src
tag spec foramp-script
which are sourced either cross-origin or inline.amp-carousel
on version0.1
since0.2
depends on an experimentalamp-base-carousel
.slide
attribute toamp-carousel
(apparently only relevant to0.2
).amp-autocomplete
be inside of aform
.template
attribute toamp-date-display
.AMP-LIST DIV [fetch-error]
tag spec.amp-video
toamp-story-page-attachment
.rel
attribute onlink
elements.width
andheight
attributes tosymbol
SVG element.Details
Compare 1907301630320...1908162134430