- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Tue, 5 Jul 2016 09:04:16 +0300
- To: "www-validator@w3.org" <www-validator@w3.org>
- Cc: "John E. Davey" <sixa369@mwt.net>
4.7.2016, 11:53, Michael[tm] Smith wrote:
> "John E. Davey" <sixa369@mwt.net>, 2016-07-02 14:02 -0500:
>> Archived-At: <http://www.w3.org/mid/57780FE2.4050905@mwt.net>
>>
>> This weekend, the validator at https://validator.w3.org/nu/ started issuing
>> a "warning" "recommending" the addition of this <html dir="ltr"
>> lang="en-US"> tag to my web pages.
That’s a very strange warning. Exactly how can this situation be
reproduced? Testing with a dummy valid HTML5 document, with no dir or
lang attribute, I get no such warning.
> You can safely ignore the warning.
I’d rather understand what is going on. A warning that suggests using a
lang attribute on the <html> element would be useful and would reflect
Web Accessibility Initiative (WAI) recommendations, and it should not be
ignored. But I have not seen such a warning, and I would be rather
surprised at seeing a warning that suggests specifically declaring the
language to be US English. A warning that suggests a dir="ltr" attribute
on the <html> element would be odd, since it would just confirm the default.
There was recently another post that quoted the following warning:
*Warning*: This document appears to be written in English. Consider
adding |lang="en"| (or variant) to the |html| element start tag.
That makes more sense, but it too is odd. (Explicitly declaring the
language would be most useful when the content language *cannot* be
detected programmatically with high reliability using the tools of
Google and friends.)
It seems to me that there have been some experimental changes in the
validator, doing some natural language guessing and making suggestions
on lang attributes. And my guess is that these experiments were then
removed from the production version, after causing some confusion.
>> I need to know if this is going to remain a warning and recommendation or if
>> you plan on turning this into an error
>
> It will not be turned into an error.
>
>> or what...and why?
>
> Because the HTML spec does not define it as an error.
It does not currently do that, but I don’t think there’s really any
guarantee that it won’t be changed. I would not even be surprised if the
lang attribute were made mandatory on the <html> element. I could list a
dozen reasons to do so (and a few reasons against it).
Yucca
Received on Tuesday, 5 July 2016 06:04:47 UTC