All content should specify its language. This is meta data, information that is not visible on the screen, but is interpreted by tools like screen readers. If a screen reader user is bilingual, they may visit both English-language and Spanish-language pages. They have their readers set to read both English and Spanish text in the correct pronunciations. Specifying the language of the content on your page or document will tell the screen reader which language it is reading, which set of pronunciations to use.
There are two places to set the language of the content on the page:
- At the page level, defining the language of the page/document as a whole.
- Around on any content on the page that is not in the primary language.
In HTML, the language should be defined in the root <html> element. This makes it apply to the document as a whole. The code for English is "en", the full list is in the ISO 639-1 standards.
If you are using a standard web theme provided by the university, it very likely includes this already, and no action is needed.
In the desktop version of MS Word and other Office products, you can change these settings under File -> Options, then choose the Language option in the dialog box. In Office 365, language preferences are set at the account level.
As with HTML, if you are using Word on an operating system that is set to English, this is probably pre-defined for you. Only change this if you are authoring content in a non-English language.
Specific Text Within a Page
If you have small portions of alternate-language text within your page or document, define the language of that specific content. As an example, if you had a syllabus for a class on early European film, you might have different units on Italian film, German film, and French film. The syllabus as a whole would be in English, but there would be different lists with film titles in Italian, German, and French. You would add language tags to the film titles.
In HTML, this would look like:
<li lang="it">Le mura di Malapaga</li>
This tells screen readers that this list item should be read as Italian-language text. You can add the lang attribute to any element in HTML.
In the Desktop version of Word, highlight your alternate language tag, then under Review -> Language you can choose to define specific words in their correct language.
How to Test
Automated tools will tell you if the language is not set for the document or page as a whole. If your document has foreign-language content, you can verify that it is tagged correctly by looking directly at the HTML or opening up the same settings options in your content authoring system that you used originally to assign the language tags.