Hidden barriers - bad language

Do be careful to define a base (natural) language on all web pages. Otherwise, defining other languages can result in the entire page being read by a screen reader trying to use the pronunciation rules for the wrong language.

This can happen where the HTML tag isn’t given a LANG attribute, for instance:
<httml lang="en">

The problem arises if there is any coded “change” to the natural language on the page, because the “change” is, in fact, the first time that a language is defined. So everything after it may be pronounced as if it is in the “foreign” language.

Screen readers have a library of pronunciation rules, and if the “foreign” language is in the library, then any text after a LANG attribute will be pronounced using the correct rules for that language.

On a properly coded page, with a defined natural language, this applies only for the element to which the LANG is applied. At the end of that element, the natural language pronunciation rules are reapplied.

But where no natural language is defined, when the content on the page goes back to the natural language, the screen reader has no natural language to revert to, and so it may carry on using the current rules for pronunciation.

Ever heard English pronounced as though it were Portuguese?

Believe me, no-one from either England or Portugal will understand it.