You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of ampproject/amp-wp#2974, the AMP WordPress plugin normalizes the bracketed amp-bind attribute syntax to data-amp-bind-*, so the original [src] is being converted here to data-amp-bind-src. The AMP validator then is flagging this as an error because of this mandatory_anyof constraint:
I actually think the proposed fix is fine. The validator isn't really aware of the current [foo] syntax in any special case way, these are just allowed. All data- attrs are also allowed.
Is there any other example of an issue caused by the validator being not aware of the bind syntax?
On blog.amp.dev we noticed a validation error starting to happen after ampproject/amp.dev#2934:
The markup being introduced included:
As of ampproject/amp-wp#2974, the AMP WordPress plugin normalizes the bracketed amp-bind attribute syntax to
data-amp-bind-*
, so the original[src]
is being converted here todata-amp-bind-src
. The AMP validator then is flagging this as an error because of thismandatory_anyof
constraint:amphtml/extensions/amp-list/validator-amp-list.protoascii
Line 93 in 8c7a612
A quick fix here would be to just add
data-amp-bind-src
to the list:However, this seems like a fix for a more fundamental issue where the validator needs to be more aware of the alternate syntax (#11115).
The text was updated successfully, but these errors were encountered: