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 auditOther accessibility checks
- ARIA roles and attributes that are not valid
- ARIA widgets missing a required part
- Blinking text, timed reloads or sound that plays by itself
- Buttons with no name for screen readers
- Controls keyboard and screen reader users cannot reach properly
- Custom controls and dialogs with no name
- Data tables with confusing header markup
- Elements with a tabindex above 0
- Embedded frames with no title
- Empty headings
- Form fields labelled in a confusing way
- Form fields with no name for screen readers
- Graphics with no text alternative
- Heading levels that skip
- Labels or ARIA attributes point at a duplicated id
- Lists built with the wrong elements
- No main landmark on the page
- No working way to skip to the main content
- Page language code is not valid
- Page regions (landmarks) marked up in a confusing way
- Pinch-to-zoom is switched off
- Scrolling text built with the obsolete marquee tag
- Table header rows not marked as headers
- UI controls marked up as links
- Videos with no captions track
- Zoom is capped below 500%