Skip to content

Validator incorrectly identifying required extensions for amp-carousel #18091

@garanj

Description

@garanj

What's the issue?

AMP HTML containing <amp-carousel> without the accompanying component <script> element is wrongly identified by the validator as being the lightbox mode version, as opposed to the ordinary version, and requesting components beyond just amp-carousel be included, namely amp-lightbox-gallery:

$ amphtml-validator example.html
example.html:18:2 The mandatory attribute 'lightbox' is missing in tag 'AMP-CAROUSEL [lightbox]'. (see https://www.ampproject.org/docs/reference/components/amp-carousel)
example.html:18:2 The tag 'AMP-CAROUSEL [lightbox]' requires including the 'amp-carousel' extension JavaScript. (see https://www.ampproject.org/docs/reference/components/amp-carousel)
example.html:18:2 The tag 'AMP-CAROUSEL [lightbox]' requires including the 'amp-lightbox-gallery' extension JavaScript. (see https://www.ampproject.org/docs/reference/components/amp-carousel)

Note that including the amp-carousel extension <script> is enough to make validation pass, in spite of the above messages.

How do we reproduce the issue?

  1. Copy HTML from http://jsbin.com/tuvibewiko/edit?html,output
  2. Run this HTML through amphtml-validator.

What browsers are affected?

At least: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36

Which AMP version is affected?

amphtml-validator cli tool.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions