Play Framework: Adding a Lang Attribute

If we create a new Play Framework project

and then take a look at main.scala.html, we’ll see something like this.

Notice that the html element doesn’t have a lang attribute. That’s a problem. WCAG 2.0 Success Criterion 3.1.1 says: 3.1.1 Language of Page: The default human language of each Web page can be programmatically determined. (Level A) And technique H57: Using language attributes on the html element says: The objective of this technique is to identify the default language of a document by providing the lang and/or xml:lang attribute on the html element. Identifying the language of the … Continue reading Play Framework: Adding a Lang Attribute