Hey everyone. Josh here with Online ADA. In this video, we’re covering 3.1.2–Language of Parts. This is a AA requirement and I’ll read the description here for you.
“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 immediate surrounding text.”
This is an article that actually ties directly into the previous article, 3.1.1– Language of the Page. When you identify the language of the page, you’re saying this page is primarily in English. This article, 3.1.2, is saying that whenever that changes–whenever we are presenting content that is not in the primary declared language, we want to surround it with another lang attribute, L-A-N-G, and the value of that is going to be the language that it is being presented in.
For instance, if we have declared the page as English, lang EN on the HTML attribute, then we go and provide a word somewhere on the page that is not a technical term or proper name, for instance. Then we would surround that in, let’s say, maybe a span or a DIV element and give that element, LANG equals FR, for French. And that’s gonna tell synthetic speech software to pronounce it appropriately. If you don’t do this, then it will try to read it as if it was English and it will probably come out as something garbled. Probably won’t make a lot of sense. As soon as you identify it as a language that is different than the speech synthesizer, assuming it supports various languages, will then be able to read it correctly and it’ll make a whole lot more sense.
Now this is only for words that are, let’s see, how do they put it in the documentation? Not part of the vernacular of the immediate surrounding text. So if you have the word “podcast,” it’s pretty recognizable as a word, even in other languages like French, for instance. And so on the documentation they have an example of this big, long sentence–it’s all in French–and the word “podcast” is just a part of that sentence. And they’re saying that you don’t actually have to identify that popular, well-known word because it’s actually part of the French vernacular as well. So it doesn’t need immediate translating. Uh, it can just be left as it is.
But a really good example of where you would want to do this–where you would want to identify the various languages–is if you had some sort of drop down or interface that provided buttons for changing the languages of the page, or maybe even just sections of the content, and each of the buttons presented the language in that language. You would want to surround each of those buttons with a lang attribute for the appropriate language. This will be making sure that the synthetic speech or the Braille translation hardware, and software, will read it correctly. This benefits a lot of people. For instance, those who are using screen readers and other technologies to help convert text into synthetic speech. It’s gonna help people who have–find it difficult to read written material with fluency and accuracy, such as recognizing characters, alphabets, decoding words, and understanding words and phrases. And, um, it also helps people who rely on captions to recognize language changes and soundtracks and synchronized media.
It’s just a really good idea to inform the user when a language changes so that their hardware and software combined can keep up with what’s happening on the page. We want the experience on our websites to be as seamless as possible for people who have accessibility issues. As seamless as it would be for someone who didn’t have those same disabilities. So anything we can do to make sure that their experience is as great as possible is gonna be just one more step towards making the web accessible.
So, thank you very much for joining us on this video and I will see you in the next one.