This page declares the language as English with lang="en"
. This establishes a baseline for the screen reader to choose which voice/language to pronounce the content. We need to place a lang attribute on sections within the page that have a different language. This tells the screen reader to switch to the new language for that content. It makes the page much more enjoyable.
The following sections have translated text for "Hello. Welcome to my test page."
Hola. Bienvenidos a mi página de prueba.
Hallo. Willkommen auf meiner Testseite.
Здравствуйте. Ласкаво просимо в мою тестову сторінку.
Bonjour. Bienvenue sur ma page de test.
This video shows how JAWS reacts to the different language declarations. I did not have a Ukranian language, so it fails on that section.
<h3>Spanish</h3>
<p lang="es">
Hola. Bienvenidos a mi página de prueba.
</p>
<h3>German</h3>
<p lang="de">
Hallo. Willkommen auf meiner Testseite.
</p>
<h3>Ukranian</h3>
<p lang="uk">
Здравствуйте. Ласкаво просимо в мою тестову сторінку.
</p>
<h3>French</h3>
<p lang="fr">
Bonjour. Bienvenue sur ma page de test.
</p>