Accessibility

Language codes on parts of the page that are not valid

One of the 156 checks Lala SEO runs on every page of a site in a free audit.

How serious
Worth knowing. Small, or only matters in some cases. Read it and decide.
Score
Reported, but it does not lower your site's score.
Based on
Industry standard: Google does not document this one, so the check follows established practice.

What is wrong

Some of your page content is marked with language codes that don't follow the proper format. Language codes tell search engines and assistive technology—like screen readers for blind visitors—which language a particular section is written in. When the code is invalid, browsers and assistive technology may misinterpret or ignore the instruction entirely.

Why it costs you

This matters because screen readers may pronounce words with the wrong accent or skip the content altogether. Search engines may also struggle to understand or index multilingual sections of your page correctly. Visitors using assistive technology could find parts of your site unusable or confusing.

How to fix it

Find any `lang` attributes in your HTML that don't match the standard format—which should be a language code like `en` for English, optionally followed by a hyphen and a region code like `en-GB`. Common errors include made-up codes, typos, or codes with underscores instead of hyphens. Once you've found them, correct them to the proper ISO 639-1 format. If you have a page template that generates these attributes, fix the template rather than individual pages.

What the audit tests

  • Every lang value set on part of a page is a valid language code
  • The html element's lang and xml:lang name the same language

Check your site

Run a free audit of up to 300 pages. No card needed.

Start a free audit

Other accessibility checks

All SEO checks