Closed mattgarrish closed 1 year ago
This should be ideally delegated to validator.nu, but I added a new check for it until we fully integrate the HTML checker.
I don't think validator.nu fully implements the rules btw (it does not complain if the attribute contains upper alphas). But in any case, I don't expect this check to report much new errors with existing content… we'll see!
I noticed that we check that data-* attributes are allowed in both XHTML and SVG content documents but we don't appear to be enforcing the naming restrictions in the HTML specification -- specifically that the name can't begin with "xml" or contain upper-ascii characters.
https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes