3.1.2 Language of Parts: The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text. (Level AA).
This success criterion requires that the contents written in multiple languages on the same web page has the human language defined in a programmatically determinable way. In other words, where the default language of the page is, say English but the page has phrases, sentences, paragraphs or passages from any other language, then the secondary language of such texts must be programmatically determined.
Exceptions
Any words that are adopted into the default language and that is part of a phrase or immediately surrounding text need not meet this criterion technical terms can be ignored.
Benefits
Visual browsers would be able to display correct characters for the language of parts and change the reading order for the languages that have right to left reading
Braille translating software would be able to provide correct Braille characters and contractions
Screen readers would be able to switch to apt pronunciation rules
Traditional browsers would be able to process the texts aptly
Machine based translation technologies would be able to translate the texts from one language into another when there is a change of language
In the modern browsers, when such secondary language texts occur, users would be able to look up the meaning using a dictionary.
Points to Ponder
Ensure to use appropriate language code (lan=”fr”) wherever the text is in other language
Ensure appropriate language token is used in the lang attribute (lang=”pt-br”).
Digital accessibility is my passion. Working with as many industry leaders, striving to achieve digital inclusiveness and spread #a11y awareness in every
nuke and corner of the digital world!