Simple Header Bar
A Simple Header Bar shows a short, high-priority announcement above the main navigation — a message, an optional call to action, and a close button.
Usable — may still change
The Simple Header Bar is a slim, full-width strip that sits above the main navigation and carries a single high-priority announcement — a short message, an optional call to action, and a close button. It draws attention with a saturated surface (a flat solid on Toyota, a copper gradient on Lexus) and light text, then gets out of the way once the user dismisses it. Reach for it to surface something timely and relevant to everyone on the page, not to run generic marketing.
Anatomy
Section titled “Anatomy”- Header bar
- Message
- Call to action
- Close
The Header bar is the surface that spans the top of the page and sets the announcement apart with its brand fill and contrast text. The Message carries the announcement in a short, scannable piece of text. The Call to action is an optional link that lets the user act on the message. The Close button lets the user dismiss the bar.
When to use it
Section titled “When to use it”Use a Simple Header Bar when:
- You have a single, high-priority message that is relevant to everyone on the page — a service notice, a deadline, an important update.
- The message is short enough to scan at a glance and, at most, points to one action.
- The announcement can be dismissed and should stay out of the way once it has been seen.
Avoid a Simple Header Bar when:
- The message is generic marketing noise rather than timely, relevant information.
- You need more than one call to action, or a long block of copy — keep it to one idea and one action.
- The content belongs inline with the page rather than pinned above it — a header bar carries one page-level announcement, not a contextual, severity-coded message.
- It would block or overshadow the main navigation, or you would stack several bars at once.
Properties
Section titled “Properties”Message
The message is the heart of the bar — a single, short line set in the title-10 type so it reads clearly against the saturated surface. Keep it to one scannable idea; a long message truncates with an ellipsis rather than pushing the other elements around.
Call to action
An optional link (a tertiary button) that lets the user act on the announcement — “Learn more”, “Book now”. Use at most one, and drop it entirely when the message stands on its own; the layout re-centres the message when the CTA is absent.
Close
An icon-only close button, pinned to the trailing edge, dismisses the bar. Dismissal is always available so the announcement never traps the user.
Surface
The bar carries a saturated brand surface with contrast text: Toyota uses a flat solid background, while Lexus renders a copper gradient. The treatment is brand-driven — the markup is identical across brands.
Platform considerations
Section titled “Platform considerations”Desktop
The message and its CTA sit together, centred across the bar, with the close button pinned to the trailing edge. There is room for the announcement to breathe, so the group reads as one balanced unit.
Tablet
The same centred layout holds. Keep the message short so it stays on one line as the bar narrows, and let the CTA sit comfortably beside it.
Mobile
Space is tight, so the message aligns to the leading edge and truncates with an ellipsis while the CTA and close move to the trailing edge — the announcement stays legible and the action stays reachable without wrapping the button.
Best practices
Section titled “Best practices”The bar works best when it carries one timely message that everyone on the page benefits from, and disappears cleanly once it has been seen.
Do
Use it for high-priority, relevant information. Keep the content short and scannable, provide a single clear CTA, make it dismissible, and respect the user’s dismissal for the rest of the session. Make sure it works across every breakpoint.
Don't
Don’t overload it with text or multiple CTAs, or use it for generic marketing noise. Don’t stack several banners, and don’t let it block or overshadow the main navigation. Don’t re-show it after dismissal in the same session unless the message is critical, and never rely on colour alone to carry the meaning.
Content guidelines
Section titled “Content guidelines”Keep the message to one short, scannable line in sentence case — name the announcement in plain language and lead with what matters. Pair it with at most one call to action, labelled with a clear verb (“Learn more”, “Book now”). If the message is time-sensitive, make the urgency clear in the words rather than leaning on the surface colour, and keep the whole bar to a single idea so it reads at a glance.
The header bar is a plain block — it fills the width of wherever you place it, so drop it in a full-width slot above the navigation. Put is-contrast on the root so the message, CTA, and close button all pick up their contrast tokens from the container — no per-element class needed. The message is a tng-text-title element — the bar pins it to title-10, so no size modifier is needed; add tng-overflow-ellipsis so a long message truncates instead of pushing the CTA around.
<div class="tng-simple-header-bar is-contrast"> <p class="tng-text-title tng-overflow-ellipsis"> This is a small description </p> <a class="tng-button is-tertiary" href="#">This is a button</a> <button class="tng-icon-button is-ghost" aria-label="Close"> <i class="tng-icon icon-close" aria-hidden="true"></i> </button></div>Without a CTA
Section titled “Without a CTA”The call to action is optional — drop the link and the message centres on its own. No modifier is needed; the layout adapts to whether a button is present.
<div class="tng-simple-header-bar is-contrast"> <p class="tng-text-title tng-overflow-ellipsis"> This is a small description </p> <button class="tng-icon-button is-ghost" aria-label="Close"> <i class="tng-icon icon-close" aria-hidden="true"></i> </button></div>Dismissal
Section titled “Dismissal”Dismissing the bar — hiding it on click and remembering that choice for the session — is the consumer’s responsibility; the styleguide ships only the markup and the close control. Wire the close button to remove or hide the bar, persist the dismissal (for example in sessionStorage), and don’t re-show it in the same session unless the message is critical. Move focus somewhere sensible after dismissal so it is never stranded on the removed element. See the Accessibility tab for the labelling and focus contract.
The Simple Header Bar ships as a neutral container: the styleguide owns its layout, surface, and the close control, and leaves the landmark semantics, accessible naming, and dismissal behaviour to you to apply per context. An accessible header bar keeps its text and controls readable on the saturated surface, exposes the CTA and close button to the keyboard with visible focus, gives the close button an accessible name, and — when the announcement warrants it — names the bar as a landmark region. It meets WCAG 2.1 AA.
For designers
Section titled “For designers”- The message, CTA, and close icon must keep accessible contrast against both the Toyota flat surface and the Lexus copper gradient, across their full range. Source: WCAG 1.4.3 Contrast (Minimum).
- Never let the announcement’s meaning ride on the surface colour alone — the words have to carry it. Source: WCAG 1.4.1 Use of Color.
- The CTA and close button need a visible focus style that meets contrast on both surfaces and is clearly distinct from hover. Source: WCAG 2.4.7 Focus Visible.
- Use semantic colour tokens rather than fixed values so the bar adapts correctly across brands and surfaces.
For developers
Section titled “For developers”The bar renders as a plain <div> with no implicit role. When the announcement is significant enough to be a landmark — for example a persistent service notice — wrap it as a region: add role="region" (or use a <section>) together with an accessible name via aria-label or aria-labelledby pointing at the message. Leave the role off for an incidental bar rather than adding an unnamed landmark or spamming several regions on one page. The CTA is an ordinary link and the close is an ordinary <button>, so both are keyboard-operable with no custom scripting; keep the visible focus ring intact. Because dismissal is your responsibility, move focus somewhere sensible after the bar is removed — the element that follows it, or the top of the page — so focus is never stranded on a removed node.
Keyboard interaction
Section titled “Keyboard interaction”| Key | Action |
|---|---|
| Tab / Shift + Tab | Move focus between the CTA and close button |
| Enter | Follow the CTA link |
| Enter / Space | Activate the close button |
The close button must present a large enough target for touch — at least the 24 px WCAG AA minimum — with comfortable spacing from the bar’s edges. Source: WCAG 2.5.8 Target Size (Minimum).
Focus order
Section titled “Focus order”Focus moves through the call to action, then the close button; the static message takes no focus, and right-to-left preserves this logical order while mirroring the layout.
- Message
- Call to action
- Close
Labelling elements
Section titled “Labelling elements”Give every element the role, name, and state assistive technology needs.
Header bar region
Optional. When the bar should be a landmark, give the container role="region" (or use <section>) plus an accessible name — aria-labelledby referencing the message, or aria-label when there is no suitable visible text. Omit the role for an incidental bar so you don’t add an unnamed or redundant landmark.
Message
Plain text that names the announcement. Keep it self-describing, since it doubles as the region’s accessible name when you label the bar with aria-labelledby.
Call to action
An ordinary link (<a>) with a clear, self-describing label. It carries its own accessible name from its text, so avoid vague wording like “click here”.
Close button
An icon-only <button> with no visible text, so give it aria-label="Close" (or "Dismiss"). The icon-close glyph inside is aria-hidden="true", so the button announces as its label alone.
Source: WCAG 4.1.2 Name, Role, Value.