Skip to content

What visitors expect: states, banners, sticky header, menus that stay on screen - #49

Merged
evangress merged 20 commits into
tabsfrom
expectations
Nov 11, 2026
Merged

evangress merged 20 commits into
tabsfrom
expectations

Conversation

@evangress

Copy link
Copy Markdown
Collaborator

Non-breaking patterns from the family work list. Work list: https://github.com/kovirlabs/tagstack/blob/expectations/EXPECTATIONS.md

Based on tabs, which holds the merged stack of #45–#48 and is not in main yet.

Defects

  • Changes in stat tiles are green ▲ / red ▼ text, not edit marks.
  • Footer columns sit at the end of the row.

Added

  • Chevron on button[aria-expanded]; aria-pressed="true" looks held down; data-tone on buttons (red Delete).
  • Red asterisk on required fields, only in forms that also have optional fields.
  • role="status" and role="alert" banners.
  • <details> chevron marker and easing open.
  • A modal dialog locks page scroll; a bottom sheet on phones.
  • <header data-layout="sticky">; " ↗" on target="_blank" links in text.
  • Menu popovers anchored to their button; [popover="hint"] tooltips (CSS only).
  • Selected table rows tinted; a magnifier in search fields; a sidebar menu on phones; a fuller print block.

Changes to existing pages

  • scrollbar-gutter: stable on the root: with classic scrollbars a short page keeps an empty strip at the side.

Checks

  • 512 tests pass in Chromium and WebKit. Firefox was not run locally.
  • 12.5 KB gzipped (cap 15 KB); guide index 3,527 of 4,000 tokens.

Not done

  • The demo page does not show the menu popovers, tooltips, selectable rows, sidebar menu or bottom sheet yet.

🤖 Generated with Claude Code

evangress and others added 20 commits November 10, 2026 18:26
…(D2)

<del>−0.4%</del> in a stat tile was struck through on a red highlight, so a
drop read as a deleted value. In a <dl> of <div>s, <ins> and <del> are now
green and red text (mixed with the text color for 4.5:1) after ▲ and ▼,
with no line and no background. Elsewhere they are unchanged (tested).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The grid's auto-fit tracks never collapsed, because the copyright line
spans them all, so two nav columns bunched at the start and left half the
row empty. The footer is now a wrapping flex row: a leading paragraph takes
the free space (up to 24rem), the navs are 10rem columns at the end, and a
last paragraph spans the width. Columns wrap on phones (tested at 360px).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A button that opens something now says so: a chevron after its label,
pointing up while aria-expanded="true". Covers TagAction's dropdown
buttons. Buttons without the attribute, links styled as buttons, and
popovertarget buttons are unchanged (tested). Demo snapshots updated for
the new example.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A solid toggle takes its hover color and an inset shadow; an outline or
secondary one fills with a tint of the primary color and full-contrast
text. TagAction's Show/Hide and theme buttons gain a visible state.
aria-pressed="false" is unchanged. Contrast fixture covers all three.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
<button data-tone="error">Delete</button> is solid red, and with
class="outline" red-bordered; every tone and style="--tone: …" works.
The fill is the tone darkened to OKLCH lightness 0.5 at most, so white
text passes 4.5:1 in both schemes (contrast fixture covers each tone,
solid and outline). The demo's confirm dialog uses it. The automatic-
contrast tests read a demo button by id now that the dialog's confirm
button is red.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In a form that also has optional fields, the label of a required field
(a <label> right before it, or one wrapping it) ends in " *" in the
error color, with empty alt text since the field already says it's
required. A form where every field is required (a sign-in) gets none;
buttons and hidden inputs don't count as optional fields. Tested both.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A <p>, <div>, <section> or <aside> with role="status" is an info-tinted
banner and with role="alert" a red one; data-tone recolors either. Fill
only, no border. Left alone (tested): empty live regions waiting for a
message, inline status spans, and regions TagAction adds (data-tag).
Contrast fixture covers all three tones.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The <details> marker is a chevron instead of the browser's triangle: at
the start of the summary (turning down when open, mirrored in RTL), or at
the end in an accordion (neighboring details or a name), turning up. The
header-nav dropdown keeps its own chevron (tested).

Opening eases the height with interpolate-size and ::details-content,
behind @supports selector(::details-content), following the
modern-web-guidance animate-to-intrinsic-sizes guide: interpolate-size is
opted into on details only, overflow is clipped with a focus-ring margin,
and browsers without it (WebKit here; checked with CSS.supports in the
test) open at once, as does prefers-reduced-motion.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
:root:has(dialog:modal) { overflow: hidden }, with scrollbar-gutter:
stable on the root so the page doesn't shift sideways when its scrollbar
goes away. Non-modal dialogs (show()) leave the page alone (tested, with
a wheel scroll that must not move the page). In the page layout section,
so the scoped and Shadow DOM builds leave it out. The CHANGELOG notes the
gutter on short pages with classic scrollbars and how to undo it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ow-up)

Found in the screenshots: TagAction's Show/Hide row puts a role="group"
between the password label and its field, so the sign-up template's
required password had no asterisk.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Opt-in, as decided: the page header sticks to the top on the page
background; the root gets scroll-padding-top: 5rem so jumped-to headings
and focused fields land below it (WCAG 2.4.11); once stuck, a soft
shadow (a ::after gradient) fades in through a named scroll-state
container query. Following the modern-web-guidance
state-aware-sticky-headers guide: the container is named, only a
pseudo-element's opacity changes (no layout shift, so no
overflow-anchor), and without scroll-state support (WebKit here, checked
with CSS.supports in the test) the bar still sticks with its hairline.
Headers without the attribute are unchanged (tested). In the page layout
section, so scoped and Shadow DOM builds leave it out.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A link in running text with target="_blank" ends in " ↗", with alt text
"(opens in a new tab)". Buttons, nav links, heading links (cards), image
links, and document or download links (which have their own label) are
left alone (tested).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A popover holding a nav or list (a user menu) is anchored to the button
that opened it (implicit anchor from popovertarget): position-area
block-end span-inline-start, with flip-inline / flip-block fallbacks.
Following the modern-web-guidance viewport-aware-dropdowns guide without
a polyfill: inset: auto and margin are set only inside
@supports (position-area: block-end), so other browsers keep the
centered popover. Plain popovers and the phone menu are unchanged
(tested: left, right edge, bottom-edge flip, centered note; Chromium and
WebKit both support it here).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tbody tr:has(> :first-child > input[type=checkbox]:checked) gets a 10%
primary tint (also with the checkbox inside a label). False matches left
alone (tested): a toggle switch in the row, a checkbox in a later cell.
Contrast fixture covers text on a selected row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In @media print: nav, search bars, buttons (except TagAction's sort
buttons, which hold the header text), and tab rows are display: none;
articles, stat tiles, steps, details, asides, and banners avoid page
breaks inside; ::details-content of closed <details> is shown (where
supported), so a printed FAQ has its answers even without TagAction.
Tested with emulated print media; links styled as buttons still print.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A field just under the sticky header, focused the way form validation
does, scrolls out from under it thanks to scroll-padding-top (Chromium).
Skipped in WebKit, where focus() scrolling measurably stops about 5px
short of scroll-padding-top; TagAction now scrolls the first invalid
field to the middle itself, tested there in both engines.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CSS only, as the list asks: [popover="hint"] gets the text color as its
background, small type, and a light shadow; inside
@supports (position-area: block-start) it sits above its implicit
interestfor anchor with flip fallbacks. Following the modern-web-guidance
interest-triggered-tooltips guide's no-polyfill path; the guide's ARIA
script is out of scope (no tooltip JS in the family), so the docs have
authors write role="tooltip" and aria-describedby, and say to keep
needed information out of tooltips. A link with interestfor gets a dotted
underline as the visual cue. Tested: looks in both engines; hover opens
it above the button in Chromium (interestfor), skipped in WebKit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
input[type=search] inside <search> or form[role=search] gets a magnifier
drawn with a radial and a linear gradient in --color-text-muted (so it
follows the theme and dark mode, which an SVG data URL can't), with room
for it at the start, mirrored in RTL. Search fields outside a search bar
are unchanged (tested); checked visually at 2x.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Under 30rem, dialog:where(:modal) is full width, docked to the bottom
edge (margin: auto 0 0), at most 85dvh tall, with only a top border and
rounded top corners. It slides up (translate from 100%, @starting-style)
instead of growing; reduced motion makes it instant as before. Wider
screens stay centered (tested both).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Checked first (screenshot at 360px): the dashboard's sidebar stacks its
whole link list between the top bar and the page. New page-layout
pattern, mirroring the header phone menu: in a body > aside, a
button[popovertarget] and its [popover] show the nav in the sidebar on
wide screens (popover display: contents, button hidden) and only the
button on phones; the nav opens as an anchored menu under it (the menu
popover rule). No JavaScript. Tested at 1100px and 360px, with no
sideways scrolling.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@evangress
evangress merged commit 33c7647 into tabs Nov 11, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant