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: 1
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: 3425
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 soon 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

Post Reply