a11yTips — Identify the default language of the content

Identify the default language of the content

no. 002

Make sure assistive technologies can determine which language the content is in

Assistive technologies such as screen readers can reliably read content out loud to users, but these tools can’t figure out which language the content is in on their own. Providing this information will ensure these tools rely on the appropriate speech synthesis when reading content, therefore avoiding situations where the pronunciation of content is unintelligible.

To do this, simply provide the information about the default language of the document using the LANG attribute in the HTML element. Use the appropriate two-letter code to define the language, such as EN for English and FR for French. Once this is done, all the content of the page will be considered by assistive technologies as if it were from the specified language and screen readers will pronounce it as such.

User Story

As a user using assistive technology, I want the default language of the content to be identified in the markup, so that my tools can intelligibly read the content out loud to me.

Simple Code Example

<html lang=“en”>

Testing Methodology

Looking at the source code of the page, make sure the HTML element has a LANG [...]

Read article at dboudreau.tumblr.com

Article Taxonomies

Categories: