W3C home > Mailing lists > Public > public-comments-wcag20@w3.org > May 2017

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

From: Hilera González José Ramón <jose.hilera@uah.es>
Date: Thu, 4 May 2017 09:59:09 +0000
To: "public-comments-wcag20@w3.org" <public-comments-wcag20@w3.org>
Message-ID: <VI1PR03MB31199CE30B0E87B22575DE1A98EA0@VI1PR03MB3119.eurprd03.prod.outlook.com>
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

This archive was generated by hypermail 2.3.1 : Saturday, 14 July 2018 09:13:46 UTC