Start with the banner’s role on the CMS page. When an image provides information, its alt text should convey that information. Use the page title when it accurately describes the image in context.
Check which pattern takes precedence
In Image Alt From Attributes 1.0.1, a nonempty Images Alt Tag Structure field on the CMS page takes precedence over the CMS pattern for the current store view. Both fields accept custom text and the {page_title} and {content_heading} tokens. The tested version fills an existing alt="". Add a missing attribute in the editor. Image Alt From Attributes documentation
Keep alt text empty for decoration
Keep alt="" on an image that serves only as decoration. The CMS pattern can also fill an intentionally empty value. To retain decorative images’ empty alt text, keep the store view’s CMS pattern and the page field empty. Add alt text directly to informative images, or use page-specific patterns on other pages that need them. W3C guidance on decorative images
| Page and image role | Test setting | Expected alt text |
|---|---|---|
| Roller blind installation. The banner depicts installation. | CMS pattern {page_title}. The page field is empty. | Roller blind installation |
| Roller blind parts. The content heading is “Mounting bracket”. | Page field contains {content_heading} – underside view. | Mounting bracket – underside view |
| About us. The image is a decorative pattern. | Separate test with the CMS pattern and the page field empty. | alt="" |
Read the actual alt attribute after saving
Open each page in the intended store view and inspect the banner’s attribute in developer tools. If a pattern gives several different images the same text, enter a precise alternative on each informative image. For decoration, check that the attribute exists in the HTML and is empty.
Kowal Image Alt From Attributes for Magento 2 · Product image alt text from catalog data
