Amp error

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
Lotekh
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Sat Oct 12, 2019 6:33 am

Amp error

Post by Lotekh » Sat Oct 12, 2019 6:38 am

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
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Amp error

Post by Albert Wiersch » Sun Oct 13, 2019 9:20 am

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.
Image
Albert Wiersch

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Amp error

Post by Albert Wiersch » Wed Oct 16, 2019 9:32 pm

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.
Image
Albert Wiersch

Lotekh
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 5
Joined: Sat Oct 12, 2019 6:33 am

Amp error

Post by Lotekh » Mon Oct 21, 2019 8:09 am

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

Re: Amp error

Post by Lotekh » Mon Oct 21, 2019 8:14 am

Thank you very much.
Now it seems to be ok.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Amp error

Post by Albert Wiersch » Mon Oct 21, 2019 8:41 am

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.
Image
Albert Wiersch

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3451
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Amp error

Post by Albert Wiersch » Sat Nov 16, 2019 9:11 am

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.
Image
Albert Wiersch

Post Reply