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

Revisit lang attribute #1879

Closed
sideshowbarker opened this issue Jul 27, 2016 · 5 comments
Closed

Revisit lang attribute #1879

sideshowbarker opened this issue Jul 27, 2016 · 5 comments

Comments

@sideshowbarker
Copy link

sideshowbarker commented Jul 27, 2016

I maintain the W3C HTML Checker and in looking at statistics logged by it I notice there are a significant number of sites built from HTML5 Boilerplate that have <html class="no-js" lang="">. That is, they have the empty string as the value for the lang attribute, even when the document is clearly in English or another identifiable language.

I think this problem could maybe be prevented if HTML5 Boilerplate instead used something like <html class="no-js" lang="CHANGE_ME"> rather than <html class="no-js" lang="">.

@jpdevries
Copy link

What about adding an HTML comment encouraging them to make the change? That seems more consistent with the current tips (like changing the GA tracking code)

@sideshowbarker
Copy link
Author

What about adding an HTML comment encouraging them to make the change? That seems more consistent with the current tips (like changing the GA tracking code)

Yeah I think that would work fine too.

@sideshowbarker
Copy link
Author

As far as real-world sites that have this issue, a couple of the more well-known ones I’ve noticed are https://www.bookofthemonth.com/ and https://www.thehartford.com/ but there are many more.

@roblarsen roblarsen changed the title Use lang="CHANGE_ME" or something rather than lang="" Revisit lang attribute Aug 17, 2016
@roblarsen
Copy link
Member

Discussion that created the current format: #1542
Discussion before that (where we removed the lang attribute altogether): #1110

I'm against "change_me" or "change." All that will do is spread a meaningless language attribute. That works for no one. If we were going to do that, we might as well go back to lang="en" which would at least be valid some of the time. People don't look at it at all. That's always been the problem.

An empty lang attribute is what you're supposed to use if the language is undetermined.

@roblarsen roblarsen modified the milestone: 6.0.0 Sep 30, 2016
@roblarsen
Copy link
Member

Closing because I don't think there's a better answer. I've got some thoughts on how we might do some things going forward that might help this (and some other things) but... nothing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@sideshowbarker @roblarsen @jpdevries and others