amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

'expand-single-section' inside amp-validator incorrectly throws a validator error

Open shishirm opened this issue 8 years ago • 1 comments

What's the issue?

'expand-single-section' inside amp-validator incorrectly throws a validator error. This is likely because the code requires that the 'expand-single-section' attribute is present on the internal section but the actual requirement is that this attribute is present on the top level container i.e. . This is invalidating the pages and hence will not allow them to be served from the Google AMP Cache.

How do we reproduce the issue?

Sample code can be found here: https://output.jsbin.com/xakisebova#development=1

There are script errors because jsbin inserts them but you will also see the relevant error i.e. "The attribute 'expand-single-section' may not appear in tag 'amp-accordion'."

What browsers are affected?

This will affect all browsers and devices

Which AMP version is affected?

Not sure but this change was introduced here: https://github.com/ampproject/amphtml/commit/289ef164ff8cf73c2ef223c1b966de93a9cf2729#diff-4bc51b9dcd1bd5bc2b23f86598b4b0fd

attrs: { name: "expand-single-section" value: "" } needs to move from tags: { # >

to tags: { #

shishirm avatar Mar 14 '18 00:03 shishirm

Not exactly a duplicate but will be fixed by the PR I intend to put out for #13948. Closing as such.

Sorry for the inconvenience!

nainar avatar Mar 14 '18 00:03 nainar