Making Your HubSpot Website WCAG 2.1 Compliant

3.1.2 Language of Parts

MCS Accessibility Team

MCS Accessibility Team
Last Updated July 23, 2020

The following directions are part of a full step-by-step guide to making a HubSpot website WCAG 2.1 AA compliant. These recommendations are intended for websites managed on the HubSpot CMS but can be adapted for other content management systems.

LEVELAA
Principle: Understandable
Information and the operation of user interface must be understandable.
Guideline: Readable
Make text content readable and understandable.

The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text.

View Official WCAG 2.1 Compliance Techniques

Understanding 3.1.2 Language of Parts

This guideline requires specification of language for html elements that use a different language than the specified language of the web page. When a change in language occurs, such as quotes or translations, assistive technologies and user agents can provide more accurate renderings when they're given a heads up.

The Official WCAG Guidelines recommend specifying any language changes by simply using lang attributes. 

  • Example 1: In order to practice his spanish, Waldo responded "Lo siento mi amigo Jeff." In response to this guideline, the HTML for this paragraph should specify the change in language:

    <p>In order to practice his spanish, Waldo responded, "<span lang="es">Lo siento mi amigo Jeff.</span>"</p>

  • Example 2: When a website has language variants, the links to those versions of the website should be written in the applicable language and the lang attribute should be specified. 

In addition to routine HTML elements, special attention should be given to the following:

  • Flash Content
  • PDF Documents
  • Silverlight Objects
 

Foreign words that become common in other languages do not need lang attributes (ex: rendezvous,  burrito).

For more information, please visit the official W3C article: Understanding 3.1.2 Language of Parts


Download the WCAG 2.1 Compliance Checklist

Checklist Download

Questions?

Let us know if we can help you address this specific WCAG Recommendation.