amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-accordion validation fails to identify valid secondary tags

Open dotBits opened this issue 8 years ago • 6 comments

What's the issue?

An AMP page with amp-accordion is considered invalid by online Google validator even if it adheres to amp-accordion specs https://www.ampproject.org/docs/reference/components/amp-accordion

How do we reproduce the issue?

  1. Look at Google validation result
  2. Open the AMP page and look at the source code, where amp-accordion is used
  3. Observe amp-accordion direct children, they are exactly 2: header and div amp-accordion

What browsers are affected?

All browsers

Which AMP version is affected?

AMP Version 1531800879103 - I don't know since which version this issue has been introduced

NOTE

On my local env, amphtml-validator does not throw any warning by parsing the same page

dotBits avatar Jul 26 '18 09:07 dotBits

I just took your page code over to the AMP by Example playground and everything appears valid there, but there is a floating closing paragraph tag near the bottom of amp-accordion. I doubt that solves the problem you're having but worth a shot perhaps.

image

We run amp-accordion on a couple of pages on our site (ex: https://www.craigattachments.com/careers/employment-application/) and have no issue at all with validation.

craigscott29 avatar Jul 26 '18 12:07 craigscott29

thanks @craigscott29 for pointing out this small useless closing tag. IMO it should not make the page invalid anyways...

dotBits avatar Jul 26 '18 14:07 dotBits

No problem! :)

I have seen weirder things invalidate a page before, so figured it was worth a shot.

craigscott29 avatar Jul 26 '18 14:07 craigscott29

The source passes JS validation but fails C++ validation, possibly due to a missing close tag somewhere. The amp-accordion error appears to be a red herring.

/to @Gregable

dreamofabear avatar Jul 26 '18 16:07 dreamofabear

This issue hasn't been updated in awhile. @Gregable Do you have any updates?

ampprojectbot avatar Dec 12 '18 06:12 ampprojectbot

We have separate issues for tracking parsing differences between C++ and JS validators, including closing tags, so I don't see much need to leave this open.

Gregable avatar Dec 12 '18 21:12 Gregable