A

2 Messages

 • 

80 Points

Friday, June 27th, 2025 12:45 PM

Language missing or invalid

We are using the WAVE accessibility evaluation tool for our library website and we are getting the message:

Language missing or invalid
The language of the document is not identified or a lang attribute value is invalid.
How do we designate English as the site's language?

2.1K Messages

 • 

21.2K Points

8 days ago

Per Google:
To designate English as the language of your library website and resolve the "Language missing or invalid" message in WAVE, you need to add the lang attribute to the <html> tag of each web page. 
How to set the language to English:
  1. Locate the <html> tag: In the HTML code for each page of your website, find the opening <html> tag, which is usually at the very top of the document.
  2. Add the lang attribute: Add the lang attribute to the <html> tag with the value "en" for English.
    html
    <html lang="en">
        <!-- Your website content goes here -->
    </html>
    
    This code tells browsers and assistive technologies (like screen readers) that the primary language of the page content is English. 
Why this is important for accessibility:
  • Screen readers: The lang attribute allows screen readers to pronounce words with the correct accent and language profile.
  • Search engines: It helps search engines provide language-specific results.
  • Overall user experience: Users can benefit from features like proper character and script display, and predictable font adjustments. 
By adding the lang="en" attribute to your <html> tag, you will satisfy the Web Content Accessibility Guidelines (WCAG) Success Criterion 3.1.1, which requires that the default human language of each web page can be programmatically determined. 

2 Messages

 • 

80 Points

Thank you.  How do you add this when you are using Homestead? 

I don't see where I can modify the code of the website when I am using a website builder.  

2.1K Messages

 • 

21.2K Points

@amsterdam1906​ FREE SEO Consultation: 888-412-9962