Option 1: core keys and responsive short text
The core keys are module_type, display, placement, aria_label, text_html and justify_content. The optional text_html_short provides separate compact mobile copy.
text_htmlis shown from 768 px and is always the fallback.- A non-empty
text_html_shortreplaces the full copy only below 768 px. - A missing or blank short value shows the active language's
text_html, never another language's short copy. - Links and any permitted
track-clicksmust be authored correctly in both HTML variants.
Scroll the page and resize around 768 px to inspect the working banner demo. Only one copy variant is visible and exposed at a time.
Option 2: placement and first display
The template sets the banner with data-placement and can position it at the top or bottom as a fixed element. When the classic menu is active, its bar stays sticky at the top. A visible top banner is positioned directly below it using the menu bar's actual rendered height, so the layers do not overlap when the responsive bar changes height.
A bottom banner does not affect the classic menu. The existing FAB placement is unaffected, and the mobile classic drawer still opens above both the menu bar and the banner.
The HTML includes data-show-on-first-scroll and data-delay-ms="2000". The script waits for the first scroll and then reveals the banner with a controlled transition. Core also includes both the visible top banner and the sticky classic bar in the page's scroll offset, so linked sections are not hidden behind them.
Option 3: styling and appearance tokens
The banner gets banner.auto_class and banner.auto_style from the appearance parser during the build. Colour and font come mainly from design.background_colors.banner, design.text_colors.banner, design.text_colors.banner_link and design.font_sizes.banner.
In the current Core, the parser handles shadow, border(...), animate(...), hover(...), scale(...) and no-global, among others.
Note that documentation examples may show more token variants. On a docs page, it pays to draw a clear line between concepts in the docs and exactly what the parser supports in the current implementation.
Option 4: interaction, links and accessibility
The banner renders as role="region" with its own aria_label, which makes it understandable to screen readers without any extra wrappers.
External links in text_html can use track-clicks to capture clicks in the global tracking logic. The link colour is controlled by the CSS variable --banner-link-color.
When prefers-reduced-motion is active, the transition effects of the first-scroll variant are toned down, which gives more accessible behaviour for motion-sensitive users.
Option 5: schema, SEO and AI optimisation
Banner content should normally be modelled lightly, for example with WebPageElement. For alerts or warning-type notices, SpecialAnnouncement may be more accurate. For plain calls to get in touch, ContactPoint can be a suitable addition.
Keep the schema short and local to the module: avoid duplicating WebSite/Organization nodes here if they are already handled globally.
For SEO, the banner works best as a clear supporting line, not as the main copy. So write short, concrete text and use link text that actually describes the action.