Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About w3c validation #7129

Closed
dmitry-lavrik opened this issue Nov 25, 2017 · 4 comments
Closed

About w3c validation #7129

dmitry-lavrik opened this issue Nov 25, 2017 · 4 comments

Comments

@dmitry-lavrik
Copy link

What problem does this feature solve?

Hi!

Many people asked about the W3C validation - https://validator.w3.org/

Vue.js directives is invalid for W3C. So, i created very small library for valid data-attributes:

https://github.com/dmitry-lavrik/vue-w3c-valid
https://www.npmjs.com/package/vue-w3c-valid

I wanted to give a link in the previous discussion, but it's closed.

It works before Vue.js and replace tag names ans attributes.

As sample https://jsfiddle.net/oe6ezzh2/

Maybe someone has thoughts on how to integrate this into "Vue.js" at the level of the "beforeCreate" hook?

What does the proposed API look like?

new VueW3CValid({
el: '.directivesValid'
});

and than new Vue({
el: '.directivesValid'
....
});

@posva
Copy link
Member

posva commented Nov 25, 2017

Your eventual markup is w3c compliant. Keep in mind, most SPA applications do not have any HTML template in production, so they pass the validator test.
You can see more info at #2415 and #273

Closing because this is a question

@posva posva closed this as completed Nov 25, 2017
@devovercome
Copy link

devovercome commented May 8, 2018

@posva Hi! You are talking about SPA, but I found Vue.js as the best rapid client-side behavior programming for classic round-trip environment in ASP.NET.

To be more specific - I render partial view (on server side), which has vue directives inside. This is incredible fast and easy way and also (AFAIK) the only framework which suites for that just perfect.

So its really sad that Vue.config removed, and so happy that Dmitri provided solution which really helped me out.

Hovewer! There is still an issue. Consider a vue-for iterating over img tag
I cant provide correct src at this point, so this is a real problem in my way of using vue.js.

Therefore, it doesnt suit that great for the case as I assumed in first place.

@andreymal
Copy link

vuejs.org is also not valid

@yyx990803
Copy link
Member

yyx990803 commented Jul 20, 2018

"Valid" as in can be properly parsed by all major browsers. W3C validation is pretty much pointless. I honestly don't understand why people obsess over it.

@vuejs vuejs locked and limited conversation to collaborators Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants