Fix a missing page language

A missing page language means the html element has no lang attribute, so assistive technology guesses.

The wrong voice makes an English shop sound like another language.

Steps

  1. View source and look for lang on the html tag.
  2. Set it to the real language, such as en or de.
  3. Do not leave it as an empty string.

Failing example

The html tag has no lang.

Better example

The page uses lang=en.

Shopify

In Shopify, open theme.liquid and confirm the html tag prints the shop locale. If a custom layout removed it, add lang from the request locale.

WooCommerce

WordPress sets this from Settings, General. The WooCommerce theme must keep language_attributes() on the html tag.

WordPress

Set the site language in Settings, General, and keep language_attributes() in the theme header.

Wix

Set the Wix site language in site settings so the published html includes lang. Check the published source.

WCAG

Shopify steps · Shopify · Missing alt text