Accessibility
Page declares its language
a11y.html-has-lang
Why this matters
Screen readers pick their pronunciation from this. Without it, English can be read aloud with the wrong accent and rhythm, which is hard to follow.
Who fixes it
You can, usually
Roughly how long
5 minutes
Care needed
Low risk to change
How to fix it
Set <html lang="en-GB"> for a UK English site.
On your platform
WordPress
WordPress prints this itself from Settings → General → Site Language, through `language_attributes()` in the theme's `header.php`. A missing one therefore means the theme has a hardcoded `<html>` tag instead of calling that function — which is the thing to fix, because the hardcoded version will be wrong again the day the site adds a second language.
Shopify
`theme.liquid` opens with the `<html>` tag, and Shopify's themes print the shop's locale into it. If it is missing, that attribute has been removed from `theme.liquid`.
Drupal
Drupal sets it in `html.html.twig` from the site's language, so a missing one means a custom theme's template has dropped the attribute.
Joomla
Joomla prints it from the site language in the template's index.php. A missing one means the template has a hardcoded `<html>` tag.
How we score it
Failing this check takes up to 6 points off your accessibility score. It is a fact about your site rather than a measurement, so it reads the same on every scan until you change something.
Does your site pass this one?
This check runs on every scan, along with the other 106. Free, no account, and you see the evidence for each result.
Check my siteOther accessibility checks
- Accessibility check completedThe accessibility pass runs inside a real browser, and a few things can stop it: a content security policy that blocks our script, or a page that never finishes loading. When that happens the accessibility section is marked unchecked rather than passed, because finding no problems and being unable to look are not the same result.
- Buttons have readable labelsA button with no readable label is announced to a screen reader as nothing more than 'button'. This usually happens when the button contains only an icon. If the unlabelled one is a menu toggle or an Add to Basket, the site becomes unusable rather than merely awkward.
- Form fields are labelledA form field without a label gives a screen reader user no indication of what to type into it. Placeholder text is not a substitute — it vanishes the moment somebody starts typing. On a contact or checkout form this is the difference between an enquiry and a visitor who leaves.
- Headings run in orderScreen reader users navigate by jumping between headings. When levels are skipped, that outline stops matching the page and becomes confusing to move through.
- Images have descriptions for screen readersSomeone using a screen reader hears nothing where these images are. If any of them are product photos, logos or buttons, that part of the page simply does not exist for them.
- Links have readable textA screen reader announces these as just "link", with nothing to say where they go. Icon-only links, such as social media buttons, are the usual cause.