Hero Image

Common Accessibility Failures and How to Avoid Them: Missing Document Language


17 May 2024 | Marta Rydel, Kuba Wal

It’s good practice to define the language of all webpages. If the language of the page is not specified then users with screen readers will find their screen readers works with whatever default the user sets, which may not be the language of the page.  

Failing to specify the correct language can impact multi-language users as well as those with hearing aids, who may experience the page in the wrong language and with translation subsequent issues.  


Missing Document Language, or “Language of Page”, As Defined by WCAG 2.2. 

According to the WebAIM Million Report, 2024, over 17% of Home Pages failed a Web Content Accessibility Guidelines (WCAG) 2.2 audit due to Missing Document or a having not clearly defined the Language of Page. 

WCAG 2.2 is a standard accessibility framework published by the Web Accessibility Initiative (WAI) of the World Wide Web Consortium (W3C), the main international standards organization for the Internet.  

The success criterion can be found here and is outlined as follows:  

Level: A  

3.1.1 Language of Page:  

The default human language of each Web page can be programmatically determined. 


Why Does It Matter?  

Web pages with a defined language make the language of that page clear to all users, including those accessing the page via screen readers, or using hearing aid assistance. If the language of the page is not specific, the above assistive tools will likely revert to default settings (whatever their user set as default). If the default setting differs from the language of the page, they’re accessing then their access to the page may be unreliable or incomplete. This is especially true of multilingual users who’re more likely to access pages of different languages.  

Organizations – especially international ones – must consider their users’ accessibility needs and ensure that they make the content of their pages (including the language it’s written in) clear to their users. Failing to do so can result in frustration for the user and potential breakdown in communication.  


How Do I Fix It?  

To ensure the correct language is flagged for assistive devices and to the user, it can be defined in the HTML element, using the “lang” attribute as follows:  


<html lang="en"> 
<!--document head and body--> 


Why Is This Important? 

It’s estimated that 16% of the world’s population – 1 in 6 of us – have a significant disability. In a world where technology continues to play a critical role in our daily lives, our work, our learning, and many of the businesses and services we need, it’s vital to ensure that everyone’s needs are catered for wherever possible. For any individual business, these statistics and the importance of what they represent cannot be overstated.  

Thursday, 16th May 2024, marks Global Accessibility Awareness Day, an annual event for institutions and technology companies to draw attention to the vital goal of ensuring digital assets—from websites to photos, video, audio, and social media—are accessible to everyone, including people with disabilities that may impair their sight, hearing, or mobility.  

As a specialist in application modernization and development, gravity9 is committed to this inclusivity. Here, we’re looking at some key findings of the annual WebAIM (Web Accessibility in Mind) report, which studies 1,000,000 home pages to assess their accessibility and highlight any shortfalls. We’ll be examining why they matter and what you can do to ensure that you’re not letting your customers or your business down by failing to address these vital areas. 


More in This Series

Here’s the full set of articles in this series: Common Accessibility Failures and How to Avoid Them.

  1. Low Contrast Text
  2. Missing Alt Text
  3. Missing Form Labels
  4. Empty Links
  5. Empty Buttons
  6. Missing Document Language