Picto thématique

Rule n° 127 - Each language change is identified.

The automatic tools and robots that crawl through your content may not be able to guess the main language or its possible variations. The presence of a foreign language term on a page can and should be flagged.

#Accessibility #Development #Editorial #Internationalization

Goal

  • Enable technical aids to correctly interpret content expressed in another language.
  • Simplify the work of machine translation tools.
  • Enable web crawlers to extract strings of characters in a given language.
  • Improve the accessibility of content for people with disabilities.

Implementation

Use the lang attribute and the appropriate language code for all content with a different language from that of the current page. For example: <title lang="en">Open quality standards</title>

If the content with a different language is not already tagged by an element of the existing HTML structure (title, link, quote etc.), a specific element is then required (div or span) to specify the language of this element (with the exception of the content of the title element which cannot include internal markup.).

To find out more:

Control

In each page checked:

  • Identify all the content written in a language other than the main language, including the content of the HTML attributes returned to the user (such as that of the alt attribute of images)
  • Check that the language of this content is specified via a lang attribute put in the appropriate element by the change of language (title, link, list item) or inherited from a parent element.

By Opquast - Read the license


Discover Opquast training and certification

The objective of these rules and the Opquast community mission is ‘making the web better’ for your customers and for everyone! Opquast rules cover the key major areas of risk that can negatively affect website users such as privacy, ecodesign, accessibility and security.

Opquast training has already allowed over 19,000 web professionals to have their skills certified. Train your teams, contact us

We offer a 1 hour free discovery module.