F94: Failure of Success Criterion 3.1.1 and 3.1.2 due to mismatch between lang attribute value and written language

Proposal of a new failure:
F94: Failure of Success Criterion 3.1.1 and 3.1.2 due to mismatch between lang attribute value and written language
A web page could have value in a lang attribute that not correspond to the real language of the text in page.
Example:
<html lang="es">
<body>
<p>This is a paragraph.</p>
<p lang="en">Ceci est un paragraphe.</p>
</body>
</html>
The majority of existing evaluation tools do no detect this failure, because only confirm the existence of lang attribute, so in this case they probably obtain a false positive for 3.1.1 and 3.1.2.

Correct one would be:
<html lang="en">
<body>
<p>This is a paragraph.</p>
<p lang="fr">Ceci est un paragraphe.</p>
</body>
</html>
The failure can be avoided with a human review or using a language detection tool as: https://detectlanguage.com or https://cloud.google.com/translate/docs/detecting-language, among others.

----------------------------------------
José R. Hilera
University of Alcalá - Spain

Received on Thursday, 4 May 2017 09:59:44 UTC