Skip to content
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

Fix existing AMP validation errors #873

Closed
radiocontrolled opened this issue Oct 30, 2018 · 2 comments
Closed

Fix existing AMP validation errors #873

radiocontrolled opened this issue Oct 30, 2018 · 2 comments
Assignees
Labels
AMP Work related to AMP bug Something isn't working

Comments

@radiocontrolled
Copy link
Contributor

Describe the bug
There are existing AMP validation errors that need to be fixed before #442 can be completed.

To Reproduce
Steps to reproduce the behavior:

  1. npm run build
  2. npm run start
  3. in a separate terminal window, do npx amphtml-validator http://localhost:7080/news/articles/c9rpqy7pmypo.amp || true
  4. See error

Errors

http://localhost:7080/news/articles/c9rpqy7pmypo.amp:1:3610 The mandatory attribute 'amp-custom' is missing in tag 'style amp-custom'. (see https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:53:2530 The tag 'head > style[amp-boilerplate] - old variant' appears more than once in the document. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:290 The attribute 'focusable' may not appear in tag 'svg'. (see https://www.ampproject.org/docs/reference/spec#svg)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:3048 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/components/amp-img)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:4477 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/components/amp-img)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:5993 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/components/amp-img)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:7584 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/components/amp-img)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:8736 The tag 'img' may only appear as a descendant of tag 'noscript'. Did you mean 'amp-img'? (see https://www.ampproject.org/docs/reference/components/amp-img)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:10363 The attribute 'focusable' may not appear in tag 'svg'. (see https://www.ampproject.org/docs/reference/spec#svg)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:14676 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30418 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30542 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30666 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30790 Custom JavaScript is not allowed. (see https://www.ampproject.org/docs/reference/spec#html-tags)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30921 The mandatory tag 'amphtml engine v0.js script' is missing or incorrect. (see https://www.ampproject.org/docs/reference/spec#required-markup)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30921 The mandatory tag 'noscript enclosure for boilerplate' is missing or incorrect. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
http://localhost:7080/news/articles/c9rpqy7pmypo.amp:55:30921 The mandatory tag 'noscript > style[amp-boilerplate]' is missing or incorrect. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)

Expected behavior
No errors

@radiocontrolled radiocontrolled added the AMP Work related to AMP label Oct 30, 2018
@radiocontrolled radiocontrolled added this to the 14. Page Layout milestone Oct 30, 2018
@radiocontrolled radiocontrolled added the bug Something isn't working label Oct 30, 2018
@ChrisBAshton ChrisBAshton self-assigned this Oct 31, 2018
@ChrisBAshton
Copy link
Contributor

The attribute 'focusable' may not appear in tag 'svg'. (see https://www.ampproject.org/docs/reference/spec#svg) is logged in issue #679.

@ChrisBAshton
Copy link
Contributor

Have worked on a proof of concept fix here: #878

Raised each individual validation error in #883, #886, and #885.

A wider investigative piece of work will need to be done to handle component-level AMP requirements - captured here: #884.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP Work related to AMP bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants