Feed on
Posts
Comments

Document Language

The natural language of every web page should be defined. This is typically done by simply specifying the appropriate language code in the lang attribute on the <html> tag (<html lang=”en”>, for example).

This WCAG 2.0 Level A requirement is vital to ensure that assistive technologies present content in the appropriate language. Consider a user that understands and has set his screenreader to read in both French and English, with French being the primary language. If he encounters an English page that does not have the language specified, it would likely be read using the screen reader’s French language settings, intonation, inflections, etc., thus making it very unintelligible. Specifying the document language ensures that it be read in the appropriate way, so long as the screen reader supports that language.

The language should also be defined for portions of a page that are not in the document’s language, such as a quotation in French found on an English web page. This is also done using the lang attribute (e.g., <div lang=”fr”>).

Leave a Reply

MDTAP | 2301 Argonne Drive, Room T17 Baltimore, Maryland 21218| Voice: 410-554-9230 Toll Free ⁄ Voice 1-800-832-4827|Email: mdtap@mdtap.org