How to fix object alt on Shopify

Add a descriptive text alternative to every `<object>` element so screen readers can convey its content to users who cannot see it.

Steps for Shopify

  1. In your Shopify admin, go to Online Store → Themes → click 'Customize' on your active theme.
  2. To edit raw HTML: go to Online Store → Themes → Actions → Edit code.
  3. Locate the template file that contains the `<object>` element (e.g. `sections/rich-text.liquid`, `templates/product.liquid`, or a custom section).
  4. Find the `<object>` tag and add `aria-label="Descriptive text here"` to its opening tag, and/or add fallback anchor/text between the open and close tags.
  5. If the `<object>` is embedded via a page's HTML content block (rich text), go to the page/product editor, switch the content field to HTML view (the `<>` icon in the rich text toolbar), and edit the tag there.
  6. Save your changes and verify with the axe DevTools browser extension.
Official Shopify documentation ↗
<object data="product-spec.pdf" type="application/pdf" aria-label="Product specification sheet for Model X (PDF)">
  <a href="product-spec.pdf">Download the Product Specification Sheet for Model X (PDF)</a>
</object>

What is object alt?

The HTML `<object>` tag is used to embed content like PDFs, Flash files, SVGs, or other media directly in a web page. WCAG Success Criterion 1.1.1 ("Non-text Content") requires that every non-text element — including `<object>` embeds — has a meaningful text alternative that describes what it is or what it does. This alternative can be provided via an `aria-label` attribute, an `aria-labelledby` attribute pointing to visible text, or fallback text placed inside the `<object>` tag itself. Without one, the element is invisible to assistive technology.

Screen readers used by blind and low-vision shoppers will skip over or announce an `<object>` element as meaningless — saying something like "unlabelled graphic" or nothing at all — if it has no text alternative. This creates a broken experience for those customers: they may miss a product demo, an embedded PDF data sheet, or a promotional graphic, which can directly cost you sales. Legally, failing WCAG 1.1.1 exposes your store to accessibility complaints and lawsuits under the ADA (US), EAA (EU), AODA (Canada), and equivalent laws in many other countries. Search engines also use text alternatives as indexable content signals, so labelling embedded objects can marginally help SEO for the content they contain.

See the complete Object alt guide for every platform and the full background.

Not sure if your Shopify store has this?

Run a free SEOLZ audit — we’ll find object alt and every other issue across your whole site.

Scan my site free

Fix object alt on another platform