Skip to content

Attention list

The overview's one list of what is wrong, worst first, with like rows folded into one.

<section class="cap-attention" data-cap="attention-list" aria-labelledby="att-mixed-h">
  <header class="cap-attention-head">
    <h3 id="att-mixed-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">5 problems</span>
    <span class="cap-attention-src">Worst first. Read <time datetime="2026-09-30T14:12:20Z">40 seconds ago</time></span>
  </header>
  <ul class="cap-rows" data-cap="row-list" role="list" aria-labelledby="att-mixed-h" data-cap-primary>
    <li class="cap-row" data-tone="crit">
      <span class="cap-row-status" id="m1-s"><span class="cap-status" data-tone="crit"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M5 1h6l4 4v6l-4 4H5l-4-4V5zM7.2 4h1.6v5H7.2zM7.2 10.4h1.6V12H7.2z"/></svg>Critical</span></span>
      <div class="cap-row-title"><a href="#att-web" aria-describedby="m1-s m1-d">example.com is not answering</a></div>
      <p class="cap-row-detail" id="m1-d">3 failed checks in a row, first at 14:02</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T14:02Z">11 minutes ago</time></span>
    </li>
    <li class="cap-row" data-tone="crit">
      <span class="cap-row-status" id="m2-s"><span class="cap-status" data-tone="crit"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M5 1h6l4 4v6l-4 4H5l-4-4V5zM7.2 4h1.6v5H7.2zM7.2 10.4h1.6V12H7.2z"/></svg>Critical</span></span>
      <div class="cap-row-title"><a href="#att-backup" aria-describedby="m2-s m2-d">Nightly backup for api failed</a></div>
      <p class="cap-row-detail" id="m2-d">The dump stopped at 412 MB: the disk is full</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T12:10Z">2 hours ago</time></span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status" id="m3-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#att-d1" aria-describedby="m3-s m3-d">D1 rows read will run out before the reset</a></div>
      <p class="cap-row-detail" id="m3-d">78% used, full in about 3 hours</p>
      <span class="cap-row-meta">Projected</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status" id="m4-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#att-gates" aria-describedby="m4-s m4-d">2 jobs are waiting for approval</a></div>
      <p class="cap-row-detail" id="m4-d">The oldest has waited 26 minutes</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T13:47Z">26 minutes ago</time></span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status" id="m5-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><button type="button" aria-expanded="false" aria-controls="att-mixed-prs" aria-describedby="m5-s m5-d">3 pull requests await the seat</button></div>
      <p class="cap-row-detail" id="m5-d">api, docs, web</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T13:40Z">32 minutes ago</time><span class="cap-row-chevron" aria-hidden="true"></span></span>
    </li>
    <li class="cap-attention-region" id="att-mixed-prs" hidden>
      <ul role="list" aria-label="3 pull requests await the seat">
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-pr-api">api #212 awaits the seat</a></div>
          <p class="cap-row-detail">Type check failed: 2 errors in states.html</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T13:40Z">32 minutes ago</time></span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-pr-docs">docs #88 awaits the seat</a></div>
          <p class="cap-row-detail">A reviewer asked for changes</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T12:55Z">1 hour ago</time></span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-pr-web">web #31 awaits the seat</a></div>
          <p class="cap-row-detail">The branch is behind main</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T10:20Z">4 hours ago</time></span>
        </li>
        <li class="cap-attention-link"><a href="#att-ci">Open CI and merges</a></li>
      </ul>
    </li>
    <li class="cap-row cap-attention-notices">
      <span class="cap-row-status" id="m6-s"><span class="cap-status" data-tone="info"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><rect x="1.5" y="1.5" width="13" height="13" rx="2" fill="none" stroke="currentColor" stroke-width="1.6"/><path fill="currentColor" d="M7.2 7h1.6v5H7.2zM7.2 4h1.6v1.7H7.2z"/></svg>Notice</span></span>
      <div class="cap-row-title"><button type="button" aria-expanded="false" aria-controls="att-mixed-notices" aria-describedby="m6-s m6-d">4 notices</button></div>
      <p class="cap-row-detail" id="m6-d">Nothing to act on now</p>
      <span class="cap-row-meta"><span class="cap-row-chevron" aria-hidden="true"></span></span>
    </li>
    <li class="cap-attention-region" id="att-mixed-notices" hidden>
      <ul role="list" aria-label="Notices">
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-blog">blog: no backup reported</a></div>
          <p class="cap-row-detail">No data · Its health route does not report one yet</p>
          <span class="cap-row-meta">Since setup</span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-vite">Dependency update: vite 8.3.2</a></div>
          <p class="cap-row-detail">Notice · api dashboard, a patch release</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T09:00Z">5 hours ago</time></span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-cert">Certificate for example.org renews in 21 days</a></div>
          <p class="cap-row-detail">Notice · Renewal is automatic</p>
          <span class="cap-row-meta">Yesterday</span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-drafts">Docs: 3 drafts untouched for 30 days</a></div>
          <p class="cap-row-detail">Notice · Oldest: "Field notes from the spring season"</p>
          <span class="cap-row-meta">3 days ago</span>
        </li>
      </ul>
    </li>
  </ul>
</section>

Installation

// package.json: "capsomer": "github:DrDustinEdwards/capsomer#v0.152.2"
import "capsomer/tokens.css";
import "capsomer/base.css";
import "capsomer/attention-list.css";
import { enhance } from "capsomer/behavior/attention-list";

enhance();

Usage

<section class="cap-attention" data-cap="attention-list" aria-labelledby="att-h">
  <header class="cap-attention-head">
    <h2 id="att-h" class="cap-attention-title">Needs attention</h2>
    <span class="cap-attention-count">5 problems</span>
    <span class="cap-attention-src">Worst first. Read <time datetime="...">40 seconds ago</time></span>
  </header>
  <ul class="cap-rows" data-cap="row-list" role="list" aria-labelledby="att-h" data-cap-primary>
    <li class="cap-row" data-tone="crit">
      <span class="cap-row-status" id="r1-s"><span class="cap-status" data-tone="crit">[glyph]Critical</span></span>
      <div class="cap-row-title"><a href="/sites/web" aria-describedby="r1-s r1-d">example.com is not answering</a></div>
      <p class="cap-row-detail" id="r1-d">3 failed checks in a row</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="...">11 minutes ago</time></span>
    </li>

    <!-- a group: a row whose button opens the rows it holds -->
    <li class="cap-row">
      <span class="cap-row-status" id="r2-s"><span class="cap-status" data-tone="warn">[glyph]Warning</span></span>
      <div class="cap-row-title"><button type="button" aria-expanded="false" aria-controls="att-prs" aria-describedby="r2-s r2-d">3 pull requests await the seat</button></div>
      <p class="cap-row-detail" id="r2-d">api, docs, web</p>
      <span class="cap-row-meta"><time datetime="...">32 minutes ago</time><span class="cap-row-chevron" aria-hidden="true"></span></span>
    </li>
    <li class="cap-attention-region" id="att-prs" hidden>
      <ul role="list" aria-label="3 pull requests await the seat">
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="/ci/api/212">api #212 awaits the seat</a></div>
          <p class="cap-row-detail">Type check failed</p>
          <span class="cap-row-meta">32 minutes ago</span>
        </li>
        <li class="cap-attention-link"><a href="/ci">Open CI and merges</a></li>
      </ul>
    </li>

    <!-- past the cap -->
    <li class="cap-attention-link"><button type="button" aria-expanded="false" aria-controls="att-more" data-open-label="Fewer warnings">2 more warnings</button></li>
    <li class="cap-attention-region" id="att-more" hidden><ul role="list" aria-label="More warnings">[rows]</ul></li>

    <!-- the notices: one closed row at the foot -->
    <li class="cap-row cap-attention-notices">
      <span class="cap-row-status" id="r3-s"><span class="cap-status" data-tone="info">[glyph]Notice</span></span>
      <div class="cap-row-title"><button type="button" aria-expanded="false" aria-controls="att-notices" aria-describedby="r3-s r3-d">4 notices</button></div>
      <p class="cap-row-detail" id="r3-d">Nothing to act on now</p>
      <span class="cap-row-meta"><span class="cap-row-chevron" aria-hidden="true"></span></span>
    </li>
    <li class="cap-attention-region" id="att-notices" hidden><ul role="list" aria-label="Notices">[cap-attention-child rows]</ul></li>
  </ul>
</section>
<p class="cap-attention-clear"><span class="cap-status" data-tone="ok">[glyph]All clear</span><span class="cap-attention-clear-text">Nothing needs you.</span></p>

Examples

A group open in place, with the link to its view

<section class="cap-attention" data-cap="attention-list" aria-labelledby="att-open-h">
  <header class="cap-attention-head">
    <h3 id="att-open-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">2 problems</span>
    <span class="cap-attention-src">Worst first. Read <time datetime="2026-09-30T14:12:20Z">40 seconds ago</time></span>
  </header>
  <ul class="cap-rows" data-cap="row-list" role="list" aria-labelledby="att-open-h">
    <li class="cap-row">
      <span class="cap-row-status" id="o1-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#att-kv" aria-describedby="o1-s o1-d">KV writes are at 96% of today's limit</a></div>
      <p class="cap-row-detail" id="o1-d">38 writes left until 00:00 UTC</p>
      <span class="cap-row-meta">Projected</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status" id="o2-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><button type="button" aria-expanded="true" aria-controls="att-open-jobs" aria-describedby="o2-s o2-d" id="open-group">7 jobs are waiting on you</button></div>
      <p class="cap-row-detail" id="o2-d">api, docs, web</p>
      <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T13:47Z">26 minutes ago</time><span class="cap-row-chevron" aria-hidden="true"></span></span>
    </li>
    <li class="cap-attention-region" id="att-open-jobs">
      <ul role="list" aria-label="7 jobs are waiting on you">
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-job-1">Push design/capsomer and open a pull request</a></div>
          <p class="cap-row-detail">capsomer · waits on: your approval</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T14:10Z">3 minutes ago</time></span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-job-2">Rotate the deploy token for web</a></div>
          <p class="cap-row-detail">web · waits on: a one-way action, shown in a dialog first</p>
          <span class="cap-row-meta"><time class="cap-time" datetime="2026-09-30T13:47Z">26 minutes ago</time></span>
        </li>
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-job-3">Merge docs #88</a></div>
          <p class="cap-row-detail">docs · waits on: a reviewer's flag</p>
          <span class="cap-row-meta">Yesterday</span>
        </li>
        <li class="cap-attention-link"><a href="#att-queue">All 7 in Queue</a></li>
      </ul>
    </li>
  </ul>
</section>

Warnings past the cap, behind a button

<section class="cap-attention" data-cap="attention-list" aria-labelledby="att-more-h">
  <header class="cap-attention-head">
    <h3 id="att-more-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">10 problems</span>
    <span class="cap-attention-src">Worst first. Read <time datetime="2026-09-30T14:12:20Z">40 seconds ago</time></span>
  </header>
  <ul class="cap-rows" data-cap="row-list" role="list" aria-labelledby="att-more-h">
    <li class="cap-row" data-tone="crit">
      <span class="cap-row-status"><span class="cap-status" data-tone="crit"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M5 1h6l4 4v6l-4 4H5l-4-4V5zM7.2 4h1.6v5H7.2zM7.2 10.4h1.6V12H7.2z"/></svg>Critical</span></span>
      <div class="cap-row-title"><a href="#more-c1">example.com is not answering</a></div>
      <span class="cap-row-meta">11 minutes ago</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w1">api default branch is failing</a></div>
      <span class="cap-row-meta">1 hour ago</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w2">The last watcher pass is 14 minutes old</a></div>
      <span class="cap-row-meta">14 minutes ago</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w3">D1 rows read will run out before the reset</a></div>
      <span class="cap-row-meta">Projected</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w4">KV writes are at 96% of today's limit</a></div>
      <span class="cap-row-meta">Projected</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w5">Scheduled task "mirror" has not run for 3 days</a></div>
      <span class="cap-row-meta">3 days ago</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w6">Session for "Merge docs #88" is waiting on input</a></div>
      <span class="cap-row-meta">12 minutes ago</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
      <div class="cap-row-title"><a href="#more-w7">The July budget is exceeded</a></div>
      <span class="cap-row-meta">Today</span>
    </li>
    <li class="cap-attention-link">
      <button type="button" aria-expanded="false" aria-controls="att-more-rows" data-open-label="Fewer warnings">2 more warnings</button>
    </li>
    <li class="cap-attention-region" id="att-more-rows" hidden>
      <ul role="list" aria-label="More warnings">
        <li class="cap-row">
          <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
          <div class="cap-row-title"><a href="#more-w8">API reports degraded health</a></div>
          <span class="cap-row-meta">1 hour ago</span>
        </li>
        <li class="cap-row">
          <span class="cap-row-status"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
          <div class="cap-row-title"><a href="#more-w9">The off-account mirror was not read on the last pass</a></div>
          <span class="cap-row-meta">14 minutes ago</span>
        </li>
      </ul>
    </li>
  </ul>
</section>

All clear

<section class="cap-attention" data-cap="attention-list" aria-labelledby="att-clear-h">
  <header class="cap-attention-head">
    <h3 id="att-clear-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">No problems</span>
    <span class="cap-attention-src">Worst first. Read <time datetime="2026-09-30T14:12:50Z">10 seconds ago</time></span>
  </header>
  <p class="cap-attention-clear">
    <span class="cap-status" data-tone="ok"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1a7 7 0 1 0 0 14A7 7 0 1 0 8 1zM3.9 9l3 3 5.2-5.6-1.4-1.4-3.8 4.2-1.6-1.6z"/></svg>All clear</span>
    <span class="cap-attention-clear-text">Nothing needs you.</span>
  </p>
</section>

Hover and focus on a row, a child, the foot link and the notices row

<section class="cap-attention" aria-labelledby="att-forced-h">
  <header class="cap-attention-head">
    <h3 id="att-forced-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">2 problems</span>
  </header>
  <ul class="cap-rows" role="list" aria-labelledby="att-forced-h">
    <li class="cap-row">
      <span class="cap-row-status" id="f1-s"><span class="cap-status" data-tone="warn">Warning</span></span>
      <div class="cap-row-title"><a href="#att-forced" aria-describedby="f1-s">Hovered row</a></div>
      <p class="cap-row-detail">Forced hover</p>
      <span class="cap-row-meta">now</span>
    </li>
    <li class="cap-row">
      <span class="cap-row-status" id="f2-s"><span class="cap-status" data-tone="warn">Warning</span></span>
      <div class="cap-row-title"><a href="#att-forced" aria-describedby="f2-s">Focused row</a></div>
      <p class="cap-row-detail">Forced focus</p>
      <span class="cap-row-meta">now</span>
    </li>
    <li class="cap-attention-region" id="att-forced-r">
      <ul role="list" aria-label="Rows a group holds">
        <li class="cap-row cap-attention-child">
          <div class="cap-row-title"><a href="#att-forced">A child row, hovered</a></div>
          <p class="cap-row-detail">On the raised tone, sunken on hover</p>
          <span class="cap-row-meta">now</span>
        </li>
        <li class="cap-attention-link"><a href="#att-forced">Open CI and merges</a></li>
        <li class="cap-attention-link"><a href="#att-forced">Open CI and merges, focused</a></li>
      </ul>
    </li>
    <li class="cap-row cap-attention-notices">
      <span class="cap-row-status" id="f3-s"><span class="cap-status" data-tone="info">Notice</span></span>
      <div class="cap-row-title"><a href="#att-forced" aria-describedby="f3-s">4 notices, hovered</a></div>
      <p class="cap-row-detail">Nothing to act on now</p>
      <span class="cap-row-meta">now</span>
    </li>
  </ul>
</section>

Comfortable density

<section class="cap-attention" data-density="comfortable" aria-labelledby="att-comfy-h">
  <header class="cap-attention-head">
    <h3 id="att-comfy-h" class="cap-attention-title">Needs attention</h3>
    <span class="cap-attention-count">1 problem</span>
    <span class="cap-attention-src">Worst first. Read 40 seconds ago</span>
  </header>
  <ul class="cap-rows" role="list" aria-labelledby="att-comfy-h">
    <li class="cap-row" data-tone="crit">
      <span class="cap-row-status" id="c1-s"><span class="cap-status" data-tone="crit">Critical</span></span>
      <div class="cap-row-title"><a href="#att-comfy" aria-describedby="c1-s c1-d">example.com is not answering</a></div>
      <p class="cap-row-detail" id="c1-d">3 failed checks in a row</p>
      <span class="cap-row-meta">11 minutes ago</span>
    </li>
  </ul>
</section>

A person's work queue: Blocking, then Waiting for you, each with Later

<div data-mount="needs"></div>

Set aside for later, with Bring back

<div data-mount="later"></div>

Nothing needs you

<div data-mount="empty"></div>

Phone width: status over title, titles wrap

<main class="specimen-page">
  <h1>Overview</h1>
  <section class="cap-attention" data-cap="attention-list" aria-labelledby="att-phone-h">
    <header class="cap-attention-head">
      <h2 id="att-phone-h" class="cap-attention-title">Needs attention</h2>
      <span class="cap-attention-count">2 problems</span>
      <span class="cap-attention-src">Worst first. Read 40 seconds ago</span>
    </header>
    <ul class="cap-rows" data-cap="row-list" role="list" aria-labelledby="att-phone-h">
      <li class="cap-row" data-tone="crit">
        <span class="cap-row-status" id="ph1-s"><span class="cap-status" data-tone="crit"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M5 1h6l4 4v6l-4 4H5l-4-4V5zM7.2 4h1.6v5H7.2zM7.2 10.4h1.6V12H7.2z"/></svg>Critical</span></span>
        <div class="cap-row-title"><a href="#ph-web" aria-describedby="ph1-s ph1-d" id="phone-att-title">example.com is not answering and has not for 11 minutes</a></div>
        <p class="cap-row-detail" id="ph1-d">3 failed checks in a row</p>
        <span class="cap-row-meta">11 minutes ago</span>
      </li>
      <li class="cap-row">
        <span class="cap-row-status" id="ph2-s"><span class="cap-status" data-tone="warn"><svg class="cap-status-glyph" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" fill-rule="evenodd" d="M8 1.2 15.4 14H.6zM7.3 6h1.4v4H7.3zM7.3 11h1.4v1.4H7.3z"/></svg>Warning</span></span>
        <div class="cap-row-title"><button type="button" aria-expanded="true" aria-controls="att-phone-kids" aria-describedby="ph2-s ph2-d">3 pull requests await the seat</button></div>
        <p class="cap-row-detail" id="ph2-d">api, docs, web</p>
        <span class="cap-row-meta">32 minutes ago<span class="cap-row-chevron" aria-hidden="true"></span></span>
      </li>
      <li class="cap-attention-region" id="att-phone-kids">
        <ul role="list" aria-label="3 pull requests await the seat">
          <li class="cap-row cap-attention-child">
            <div class="cap-row-title"><a href="#ph-pr-1" id="phone-child-title">api #212 awaits the seat while its type check is failing</a></div>
            <p class="cap-row-detail">Type check failed</p>
            <span class="cap-row-meta">32 minutes ago</span>
          </li>
          <li class="cap-attention-link"><a href="#ph-ci">Open CI and merges</a></li>
        </ul>
      </li>
    </ul>
  </section>
</main>

API reference

AttentionList

PropTypeRequiredDoes
itemsAttentionItem[]Yes
titlestring
readReactNodeHow fresh the reading is, after "Worst first.": "Read 40 seconds ago".
readingbooleanThe list is being read again: the last good rows stay, the section is marked busy and a spinner says "Reading again" in place of read, as a panel's reading does (patterns.md "Loading").
headingLevel2 | 3
clearTextstringSaid beside the ok status when no problem needs attention.
noticesDetailstringSaid under the notices row's count: what a notice is here.
groupsRecord<string, AttentionGroupInfo>What a folded group is called, what its rows have in common and where all of them are.
problemRowsnumberProblem rows shown at once before "N more warnings" (critical rows always show), and the rows a group shows before its link to the view. The Portal's 8 and 5.
groupRowsnumber
primarybooleanThe page's main list: j and k work on it before focus is inside it. One per page.
renderLink(props: RowLinkProps) => ReactNodeA router's link component; a plain <a> by default.

NeedsList

PropTypeRequiredDoes
needsNeed<G>[]Yes
show"all" | "later" | GYes"all", "later" (what is set aside) or one of the app's groups.
labelstringThe list's name. Default "Needs you", or "Set aside for later".
zonestringYesThe person's zone, sent with Later so the server brings the row back at 8 am there (the server's own guess when the script is off).
renderLink(props: NeedLinkProps) => ReactNodeA router's link component; a plain <a> by default.
useRowForm() => RowFormEach row's form for Later and Bring back (React Router: useRouterRowForm). The form posts intent ("later" or "back"), need, title and zone. Default: a plain form that posts.
onBack(need: Need<G>) => voidUndo of a Later: bring the need back (post intent "back").
searchKeystringThe key that opens search ("⌘" or "Ctrl"), to name it in the keys line; left out without.
emptyTextReactNodeThe empty state's words, for the list and for Later.
emptyLaterTextReactNode
primarybooleanThe page's main list: j and k work on it before focus is inside it.

Functions

FunctionSignatureDoes
isNotice(tone: AttentionTone): booleanA problem (critical or warning) needs a person; a notice (no data, a notice) is a fact with nothing to do now. The tier follows from the tone (audit ruling 3).
arrange(items: readonly AttentionItem[], options?: ArrangeOptions): ArrangedWorst first (critical, warning, no data, notice), keeping the given order within a tone. Then the two tiers. In the problems, rows sharing a group key fold into one group row, placed where its worst row would be; a critical row is never folded, and a group of one is just a row. Warnings past rows move to more. In the notices a group folds into a single row that opens its view, not into a second disclosure.
problemCount(a: Arranged): stringThe sentence in the header: "3 problems", "no problems".
viewLinkText(g: AttentionGroupEntry): string"All 7 in CI and merges" when the group holds more than it shows, else "Open CI and merges".
enhance(root?: ParentNode): () => voidAttaches to every [data-cap="attention-list"] under root that is not attached yet: the buttons that open and close, and j and k on the list (row-list's, attached here so one call is enough). Returns a function that detaches them all.
needsShown<G extends string>(needs: readonly Need<G>[], show: G | "all" | "later"): Need<G>[]The needs a view shows: "later" the ones set aside, "all" every one that is not, and a group name that group's ones that are not.
focusNeighbor(row: HTMLElement, rowSelector?: string): voidMoves focus off a row that is about to leave the list: to the next row's title, else the previous one's, else the current filter tab in the same panel, so a keyboard user keeps their place.
severityOf<K extends string>(items: readonly Pick<InboxItem<K>, "kind">[], waitsOnPerson: ReadonlySet<K> | ((kind: K) => boolean)): InboxSeverityThe worst severity of a set of items: needs-you when any waits on a person, failing when only a machine fault is open, none when there are none. Needs-you wins, because only a person can clear it.

CSS variables

VariableDefault
--cap-attention-padvar(--pad-card)

Parts and data attributes

ClassIs
.cap-attentionthe root
.cap-attention-childa part
.cap-attention-cleara part
.cap-attention-clear-texta part
.cap-attention-counta part
.cap-attention-heada part
.cap-attention-linka part
.cap-attention-noticesa part
.cap-attention-regiona part
.cap-attention-srca part
.cap-attention-titlea part
StateRead from
:activethe platform
:focus-visiblethe platform
:hoverthe platform
:visitedthe platform

Accessibility

KeyDoes
TabEach row's title link in order, each group's button, the "more warnings" button, then the notices button; the rows of an open group follow their button
Enter or Space on a group, "more warnings" or notices buttonShows or hides what it controls; Tab then moves into it
Enter on a row's titleFollows its link
j and k, where the app turns them onMove focus to the next or previous row's title, a group's button and the notices button included (row-list's)
  • The list is a section named by its heading, so it is a region a screen reader can jump to; the row list inside is named by the same heading.
  • A button has aria-expanded and aria-controls; its name says what it holds and how many. What it controls uses hidden, so it leaves the tab order and the accessibility tree.
  • Every problem row's status is a word ("Critical", "Warning") beside its glyph, so tone never rests on color. On a phone the word stays and moves above the title (row-list).
  • The focused row is the selected row: its tint and inset ring come from row-list, with one indicator.
  • The frame's border and the header's tint are decoration; forced colors draws a rule under the header and around what a group opens.