Every Shopify Storefront API fix we catalog

SEOLZ catalogs 1 fixes for Shopify Storefront API across 1 areas — SEO, answer-engine readiness, accessibility, security and site-health. Each lists the exact steps for Shopify Storefront API, with a link to the official docs.

Accessibility (WCAG) · 1 fixes

Html lang validQuick win

Add a valid BCP 47 language code to the `lang` attribute on your site's `<html>` element so browsers and assistive technologies know what language your content is written in.

On Shopify Storefront API

  1. In your headless/custom frontend (React, Next.js, etc.), find the root HTML document component (e.g. `_document.jsx` in Next.js or your root layout).
  2. Pass the active locale from the Shopify Storefront API's `language` field to the `lang` prop: `<html lang={locale}>` where `locale` is the BCP 47 code returned by the API.
  3. Verify by inspecting the rendered HTML source of your deployed storefront.
Code · Generic HTML (html)
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Page Title</title>
  </head>
  <body>
    <!-- page content -->
  </body>
</html>

Place this as the very first tag in your HTML document. Replace 'en' with your actual BCP 47 language code.