Page 1 of 1

Amp error

Posted: Sat Oct 12, 2019 6:38 am
by Lotekh
Why do I receive the following error when scanning an AMP web page:
The "[class]" attribute is not valid for the "div" element. Some valid attributes for this element are: "accesskey", "amp-access", "amp-access-hide", "autocapitalize", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "enterkeyhint", "fallback", "hidden", "id", "inert", "inputmode", "is", "lang", "nonce", "placeholder", "role", "spellcheck", "style", "tabindex", "title", "translate", "vocab", "aria-*" attributes, "item*" attributes, and "on" attributes (like event handlers).”

I checked the official website and even they use [class] attribute for div elements: line 642 “<div class="empty" [class]="query ? '' : 'empty'">” on view-source:https://amp.dev/

The official AMP validator does not throw any error for using [class] attribute on div element.

The page where I get the error is: https://vopsele.xyz

Re: Amp error

Posted: Sun Oct 13, 2019 9:20 am
by Albert Wiersch
Hello,

Thank you for the report.

AMP web page validation is limited because there wasn't a lot of demand for it in CSS HTML Validator so it hasn't been maintained, however, I would be happy to further improve the program's usefulness for validating AMP documents if easily possible.

I will look into this this week and reply back with further information. Please feel free to provide more feedback if you think it would be helpful for improving CSS HTML Validator's AMP validation support.

Re: Amp error

Posted: Wed Oct 16, 2019 9:32 pm
by Albert Wiersch
Hello,

Please check for updates and try v19.0303 (which is now available for the pro edition). It should ignore attributes in square brackets for AMP HTML documents.

Amp error

Posted: Mon Oct 21, 2019 8:09 am
by Lotekh
Hello,
Why do I receive the following error when scanning an AMP web page:
"[class]" attribute is not valid for the "div" element

I checked the official website and they agree the use of [class] attribute.

Re: Amp error

Posted: Mon Oct 21, 2019 8:14 am
by Lotekh
Thank you very much.
Now it seems to be ok.

Re: Amp error

Posted: Mon Oct 21, 2019 8:41 am
by Albert Wiersch
Lotekh wrote: Mon Oct 21, 2019 8:14 am Thank you very much.
Now it seems to be ok.
Great! I'm glad it is OK now. Thank you for letting me know.

Re: Amp error

Posted: Sat Nov 16, 2019 9:11 am
by Albert Wiersch
UPDATE: We've significantly improved AMP HTML checking for the upcoming major release (2020/v20). If you'd like to test an early BETA of it and provide feedback then please send me a private message.