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
According to W3C specification, custom attributes should begin with "data-". This is part of HTML5 specification designed to allow web developers to use custom attributes where there's no existing attribute they could use. This helps in semantics, accessibility, etc., while also maintaining validity of the HTML document.
The attribute name should not contain any uppercase letters, and must be at least one character long after the prefix "data-". The attribute value can be any string.
Without the "data-" prefix, the HTML document would be considered invalid in HTML5 Doctype.
According to W3C specification, custom attributes should begin with "data-". This is part of HTML5 specification designed to allow web developers to use custom attributes where there's no existing attribute they could use. This helps in semantics, accessibility, etc., while also maintaining validity of the HTML document.
The attribute name should not contain any uppercase letters, and must be at least one character long after the prefix "data-". The attribute value can be any string.
Without the "data-" prefix, the HTML document would be considered invalid in HTML5 Doctype.
https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#embedding-custom-non-visible-data-with-the-data-attributes
Some clients, such as government, have a w3c compliance rules.
Also my linter doesnt like it.
if xyz attribute was simply updated to data-xyz it would be compliant.
I may be wrong, please correct me if anyone knows differing / newer specs.
The text was updated successfully, but these errors were encountered: