Amp error

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Lotekh
Rank 0 - Newcomer
Posts: 5
Joined: Sat Oct 12, 2019 6:33 am

Amp error

Post 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
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Amp error

Post 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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Amp error

Post 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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Lotekh
Rank 0 - Newcomer
Posts: 5
Joined: Sat Oct 12, 2019 6:33 am

Amp error

Post 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.
Lotekh
Rank 0 - Newcomer
Posts: 5
Joined: Sat Oct 12, 2019 6:33 am

Re: Amp error

Post by Lotekh »

Thank you very much.
Now it seems to be ok.
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Amp error

Post 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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Amp error

Post 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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial