Jump to content

UIKIT 3 HTML validation problems?


bernhard
 Share

Recommended Posts

hi,

just checked a new sites html validation and came across lots of those errors:

5954bcdeae6d2_2017-06-2910_37_07-Showingresultsforhttps___www.hrdiamonds.com_-NuHtmlChecker.png.56ee4642daa59cfbfff01b80a67a3ef8.png

but it's exactly what the docs say:

5954bd61942c6_2017-06-2910_41_45-UIkit.png.61eff36c9cf7b2cbe00ef2f1c5b365c9.png

is it a problem of the validator? i thought custom attributes are fine for html5?

has anybody more information about that for me please? :) thank you guys!

Link to comment
Share on other sites

You should be able to use the "data-uk–*" prefix and have it pass the HTML validation. See the docs here, under the "Component usage" heading:

https://getuikit.com/docs/javascript

I understand that according to the spec, HTML5 custom data attributes should be prefixed as such, with "data-*": 

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*

 

  • Like 5
Link to comment
Share on other sites

12 minutes ago, bernhard said:

would be interesting to know why uikit does not mention that more prominent... maybe they just don't care too much about html validation?

I'm wondering the same thing... Seems strange coming from such a dedicated team.

  • Like 3
Link to comment
Share on other sites

  • 4 months later...
11 hours ago, Juergen said:

Changing from UIKit 2 to 3 - in the previous version they use the data prefix, but now.... more than strange

On 6/29/2017 at 12:25 PM, jacmaes said:

You should be able to use the "data-uk–*" prefix and have it pass the HTML validation. See the docs here, under the "Component usage" heading:

https://getuikit.com/docs/javascript

Also the changelog: https://getuikit.com/changelog

"3.0.0 beta 3 (January 17, 2017)
Add support for data-uk- prefixed component attributes"

But they keep fighting it as they tend to miss some tests of the "support" of data- prefix as the changelog lists various fixes regarding this issue. If they themselves were to use it as a default we would we see less bugs, I guess.

Edited by szabesz
typo
  • Like 2
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...