About this set
A dark announcement bar with one line of news and a link, sitting above a sticky white header with a logo, four links and a Get started button. The bar scrolls away with the page while the header sticks to the top. A close button at the right end of the bar hides it; focus then moves to the header logo, so keyboard and screen reader users are not left on an element that no longer exists. The current page, Templates, is marked with aria-current and a grey pill. Below 992px the bar text aligns left to leave room for the close button, and the links fold behind a menu button while Get started stays in the bar. Use it for launches, sales, event dates or maintenance windows. Add a storage check to the dismiss handler if the bar should stay closed on the next visit. The Bootstrap version uses a dismissible .alert with .btn-close-white and the Alert plugin, listening for closed.bs.alert to move focus, above a .sticky-top .navbar-expand-lg.
What’s included
- Dismissible bar with a real close button
- Focus moves to the logo after dismissing
- Sticky header under a bar that scrolls away
- Links collapse behind a menu button below 992px
- Get started button visible at every width
Accessibility
The close button is named Dismiss announcement and its x is hidden from screen readers. The links sit in a nav labelled Main with aria-current="page" on Templates; the menu button has aria-expanded and aria-controls and Esc closes the menu and returns focus to it. Both the bar and the header show visible focus outlines, and transitions stop under prefers-reduced-motion.
Customise it
Change the background and link colour on .ha-bar, and --ha-ink, --ha-muted and --ha-soft on .ha. Bootstrap reads --bs-alert-bg and --bs-alert-color for the bar and --bs-navbar-* for the header; in Tailwind edit the --color-ha-* theme colours.



















