From 597e9f9179b58e3d3ebdee2def1c608fd6926a50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20Mari=C8=99?= Date: Tue, 13 May 2014 21:50:00 +0200 Subject: [PATCH] Add `lang=""` to `` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the past we decided¹ to remove the `lang` attribute due to the fact that developers were often forgetting to update its value. This change turned out not to be the best solution because some of the users: * didn't read the documentation, and thus, they found the absence of the `lang` attribute confusing, or didn't even knew they had to add it * didn't notice the absence of the `lang` attribute, and thus, forgot to include it (expecting it to be there) To make things more clearer and to remind users that they need to specify the primary language of the document, this commit reintroduces the `lang` attribute, while leaving its value to `""`. Using `lang=""` has the exact same effect as not specifying the `lang` attribute at all, in both cases the language being treated as unknown². - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ¹ https://github.com/h5bp/html5-boilerplate/issues/1110 ² From WHATWG (http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#attr-lang): "To determine the language of a node, user agents must look at the nearest ancestor element (including the element itself if the node is an element) that has a lang attribute in the XML namespace set or is an HTML element and has a lang in no namespace attribute set. That attribute specifies the language of the node (regardless of its value). If both the lang attribute in no namespace and the lang attribute in the XML namespace are set on an element, user agents must use the lang attribute in the XML namespace, and the lang attribute in no namespace must be ignored for the purposes of determining the element's language. If neither the node nor any of the node's ancestors, including the root element, have either attribute set, but there is a pragma-set default language set, then that is the language of the node. If there is no pragma-set default language set, then language information from a higher-level protocol (such as HTTP), if any, must be used as the final fallback language instead. In the absence of any such language information, and in cases where the higher-level protocol reports multiple languages, the language of the node is unknown, and the corresponding language tag is the empty string. If the resulting value is not a recognized language tag, then it must be treated as an unknown language having the given language tag, distinct from all other languages." - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Close h5bp/html5-boilerplate#1542. --- CHANGELOG.md | 2 ++ index.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fede9..89bf4fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ### HEAD +* Add `lang=""` to `` + ([#1542](https://github.com/h5bp/html5-boilerplate/issues/1542)). * Update to jQuery 1.11.1. * Update to Modernizr 2.8.0. * Update to Apache Server Configs 2.3.0. diff --git a/index.html b/index.html index 899d98c..616b227 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - +