Enforcing good typography with Play Framework

Straight quotation marks and apostrophes (“, ‘) are easy to type but typographically they aren’t so great: Straight quotes come to us from the type­writer. In tra­di­tional print­ing, all quo­ta­tion marks were curly. But type­writer char­ac­ter sets were lim­ited by me­chan­i­cal con­straints and phys­i­cal space. By re­plac­ing the curly open­ing and clos­ing quotes with am­bidex­trous straight quotes, two slots be­came avail­able for other characters. Word proces­sors are not lim­ited in this way. You can al­ways get curly quotes. Com­pared to straight quotes, curly quotes are more leg­i­ble on the page and match the other char­ac­ters bet­ter. There­fore, straight quotes should … Continue reading Enforcing good typography with Play Framework

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