Skip to content
Pandus

Recommended practice Priority: Moderate

The page has no marked main content area

Nothing on the page is marked as the main content, so assistive technology cannot tell where the important part starts. This is a recommended practice that goes beyond the WCAG 2.2 AA level the law relies on.

This text was translated automatically and has not been reviewed by a native speaker yet.

Why it matters to your customers

Screen reader users jump between page areas (header, menu, main content, footer) like chapters. Here the "main content" chapter is missing, so on every product or category page they must listen through the logo, menu and banners before reaching the products.

Who is affected

  • blind people using screen readers
  • keyboard users
  • people with motor disabilities who use switch devices

How to fix it

Wrap the central content of each page template, everything between the header and the footer, in one <main> element (or a container with role="main"). Do not put the header, navigation or footer inside it. Check every template type: home, category, product, cart, checkout, blog and static pages.

On Shopify

Most current themes have <main> in layout/theme.liquid; older or custom themes may use a plain <div>. Change that wrapper around {{ content_for_layout }} to <main id="MainContent">.

On Shoptet (CZ)

Usually defined by the template, so it is hard to change yourself. Report it to Shoptet or a partner and ask for a <main> element around the page content.

On PrestaShop

Usually set in the theme's layout .tpl files (for example the layout used by all pages). Change the content wrapper to <main> in each layout file or in a child theme.

On WooCommerce

Usually the theme's header.php/footer.php open and close the content wrapper with a <div>. In a child theme, change that wrapper to <main>, or set the content container tag to main in the page builder if it offers that.

Standards

Not a WCAG success criterion: a recommended practice that makes the site easier to use.

Automated check: axe-core rule landmark-one-main. dequeuniversity.com, github.com, www.w3.org

All rules we check