Disk 82% full.
Alert
A message let into the surface, with an annunciator: a small lit legend (Note, Done, Check, Fault) beside the words that say what happened.
Kit part · Alerts · Notifications
A strip the width of the page, above everything, for one announcement: a lamp, one line, an optional key that goes somewhere and a dismiss key. It is a raised plate, not a recess, so it reads as part of the frame and not as a message in the page. It is a labelled region, there on load, and says its thing once. When it goes it closes like a drawer, so the page glides up by its height instead of jumping.
Seats open in 11 days. Want one email that morning?
Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.
Aluminium
| Part | Info | Done | Check | Fault |
|---|---|---|---|---|
| Line | ||||
| With a key | ||||
| Focus on the cross |
Graphite
| Part | Info | Done | Check | Fault |
|---|---|---|---|---|
| Line | ||||
| With a key | ||||
| Focus on the cross |
| Name | Kind | Values | What it does |
|---|---|---|---|
| section.tui-banner[aria-label] | element | name it | The strip: a raised plate the width of its container, a labelled region. Name it “Announcement” or what it announces. |
| .tui-banner__row | element | one | The row inside, centred, with room each side for the dismiss key. It is the grid row that closes. |
| .tui-banner__line > .tui-lamp + .tui-banner__text | element | the lamp and the line | The lamp is hidden from a screen reader and set by data-lamp: white for news, green for done, amber to check, red for a fault. The line is one sentence, the first clause in <b>. |
| a.tui-banner__link | element | optional, a flat key | Where it goes. Say what is there (“Read the notes”), not “Click here”. It drops under the line when the strip is narrow. |
| .tui-banner__dismiss · data-banner-dismiss | class · attribute | on a flat icon key | The cross. Needs aria-label and data-tip. Leave it out for a banner that must stay. |
| --sticky | modifier | tui-banner--sticky | Holds the strip at the top of the window while the page scrolls under it. |
| role | attribute | "alert" only when urgent | A banner is a labelled region and is read as part of the page. Add role="alert" only for a fault that appears while someone works. |
| dismissBanner(banner) | function | needs kit.mjs | Lets it go from a script: the row closes, it is hidden, the event fires and focus moves on. |
| tui-banner-dismiss | event | bubbles | Fired on the banner once it is hidden. The page decides whether to remember it. |
| Enter · Space | key | on the cross | Dismisses; focus moves to the next focusable thing after the banner. |
<!-- A labelled region at the very top of the page. The lamp only agrees with the words. -->
<section class="tui-banner" aria-label="Announcement">
<div class="tui-banner__row">
<div class="tui-banner__line">
<span class="tui-lamp" data-lamp="white" data-on aria-hidden="true"></span>
<p class="tui-banner__text"><b>Lode 4.2 is out.</b> Exports now run in the background.</p>
</div>
<a class="tui-key tui-key--flat tui-key--sm tui-banner__link" href="/releases/4-2">Read the notes …→…</a>
<button class="tui-key tui-key--flat tui-key--icon tui-key--sm tui-banner__dismiss" type="button"
aria-label="Dismiss announcement" data-tip="Dismiss" data-banner-dismiss>…×…</button>
</div>
</section>
<!-- Only for something urgent that appears while someone works: add role="alert". -->import '/kit/kit.mjs'; // wires every [data-banner-dismiss], now and later
document.addEventListener('tui-banner-dismiss', (e) => remember(e.target.id)); // the page decides what to remember
// From a script:
import { dismissBanner } from '/kit/kit.mjs';
dismissBanner(document.querySelector('#release-banner'));Needs kit.css and kit.mjs. How to install the kit.
<section> with an aria-label, so it is a named region a screen reader user can jump to and skip, and it is read in its place in the page. It is not role="alert": a banner that is there when the page loads does not interrupt anyone.--tui-ink-2 with the first clause in full ink, above 4.5:1 on the plate.aria-label: Tab reaches it after the key, and Enter or Space lets the banner go. After it goes, focus moves to the next focusable thing on the page, never to the top of the document or to nothing.The raised plate the kit gives a panel, with the same bead-blast, cut across the page with square corners and a hairline under it. The row is one grid row of 1fr that eases to 0fr when the banner leaves, so the strip is never given a height of its own, and its contents are hidden as it closes so nothing can be pressed on the way out. The dismiss is about twenty lines in banner.mjs, delegated from the document so banners added later work too, and it borrows the Alert’s way of finding where focus goes next.
One announcement across the top of the page. A lamp agrees with the words, the key goes where the words say, and the dismiss key lets it go without moving anything you are reading.
6 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.
Disk 82% full.
A message let into the surface, with an annunciator: a small lit legend (Note, Done, Check, Fault) beside the words that say what happened.
A confirmation after an action: a small plate with a lamp and one factual sentence, read out politely, gone in 3.6 seconds.
A key with an icon and no words, square or round: transport, power, the small tools. Its aria-label names it; a tip shows the name.