3.1.1
Language of Page

Set Default Language for Web Pages

Ensure that the primary language of each web page is clearly defined so that assistive technology can present the content in the correct language.

Acceptance Criteria

• The default human language of the page is specified in the code.

Examples

• If a webpage is primarily in German but also contains some English, set the default language to German.

• When switching between languages on a page, update the language setting accordingly.

Exceptions

Tips

• Use HTML language attributes (e.g., <html lang="de"> for German) to set the default language.

• If your page contains multiple languages, ensure that the predominant language is correctly set, and consider marking sections with different languages using appropriate language attributes.

How to test?

• Check the HTML code of the page for the lang attribute in the <html> tag.

• Use browser developer tools or accessibility testing tools to confirm that the default language is correctly identified by assistive technologies.