Introduction to Identifying Languages
Imagine hearing a page written in English but pronounced as if it were Spanish. It would be difficult for listeners to understand. Most screen readers and other text-to-speech software can support many languages. Assistive technologies can pronounce these languages when the code identifies them.
Overview
Section titled “Overview”Defining the default page language used for content ensures that the browser and assistive technologies, such as screen readers and other text-to-speech software, will use the specified language as the default text-processing language.
This process also occurs when part of the content is in a language other than the page’s primary language. When you correctly identify languages, the assistive technology changes the pronunciation of the text and even the voice used to match the defined language.
When the language used for content is not defined:
- Most screen readers and other text-to-speech software are set to a default language and will use it as their default text-processing language. This default setting can confuse people if screen readers encounter a different, undefined language because the screen reader will continue to use the pronunciation of the default language.
- Browsers will treat the language used most on the page as the default text-processing language. This functionality can confuse if the browser encounters a different, undefined language, as it may not render the text correctly, particularly when the language uses a different alphabet or layout (left-to-right, right-to-left).
Who is Helped
Section titled “Who is Helped”Individuals using assistive technologies, such as screen readers or text-to-speech software, benefit when these tools pronounce languages correctly. These individuals include:
- People who are blind or have another visual disability.
- People with cognitive, reading, or learning disabilities.
People who rely on captions can also be impacted when the language is not defined, as the text may not be rendered correctly.
Setting the correct language helps everyone, as this also allows browsers to:
- Render text more accurately.
- This functionality is essential for right-to-left languages or languages that do not use the Latin alphabet.
- People with cognitive and learning disabilities that impact reading skills can be affected when text is not rendered correctly.
- Return language-specific search results more accurately.
- Translate content using tools like Google Translate.