WCAG 3.1.2: Language of Parts

Back to all WCAG criteria

OVERVIEW

Effort:

  • Complexity:Easy
  • Duration:Fast

Important for:

Content

What's it about?

Text passages or words that differ from the main language must be marked with the appropriate language in the HTML.

A paragraph that includes a German phrase marked with the lang attribute.

How to

Depending on your situation, you can implement one of the following options to meet the criterion. For a deeper dive, please refer to the linked WCAG techniques.

  • Use the lang attribute for language changes

    When text is in a different language than the main language, a lang attribute must be set directly on the corresponding HTML element.

    Example:
    <p>Can we make the internet accessible? <span lang=”de-DE”>Ja können wir!</span></p>

    Individual words (especially from English) usually do not need to be marked separately in practice, since this markup is often ignored by screen readers anyway.

    Notes

    • Exception: Anglicized terms

      Foreign-language terms that are commonly used in English and understood as normal English words (e.g., kindergarten, freudenfreude, biergarten) do not need to be marked as a different language.

          How do you make content accessible?

          Our workshop for content creators and editorial teams

          Learn everything you need to know in our workshop to make the content on your website, social media, and other channels accessible!

          More about the workshop
          Our mascot Sam with a pencil and a camera. Trying to create accessible content.

          Learn accessibility with us?

          Looking to implement WCAG best practices in your design, development, or content workflow? Book a workshop for your team or contact us directly to learn more.

          Send us an email!