Skip to content

What visitors expect: removable rows, shortcuts, selectable rows, a fuller filter - #2

Merged
evangress merged 22 commits into
mainfrom
expectations
Nov 11, 2026
Merged

evangress merged 22 commits into
mainfrom
expectations

Conversation

@evangress

Copy link
Copy Markdown
Contributor

Behaviors from the family work list. Work list: https://github.com/kovirlabs/tagstack/blob/expectations/EXPECTATIONS.md

Defects

  • Help text under a password field stays under it once the Show button is added.
  • Number columns line up on the right, header included, also in rows added later.
  • A saved theme is applied when the script runs, not at DOMContentLoaded.

Added

  • Ctrl+Enter or ⌘+Enter in a <textarea> sends its form.
  • command="--remove" for rows added with --clone.
  • Filter boxes: a "No matches" line and a screen-reader count; with a name, the value is kept in the URL; matches are highlighted.
  • aria-keyshortcuts works for fields and buttons.
  • Select all, a mixed state, and Shift-click ranges for a checkbox column.
  • Image thumbnails in file inputs that accept images.
  • Printing opens every <details>.
  • Tabs work with find-in-page and #fragment links.
  • Sort order remembered under data-tag-remember; the image viewer steps through a set.
  • Dropdown lists stay on screen; the first invalid field is focused clear of a sticky bar.

Checks

  • 167 tests pass in Chromium and WebKit. Firefox was not run locally.
  • 11.8 KB gzipped, from 9.0 KB (cap 15 KB).

Not done

  • The demo page only gained the "/" shortcut; the other new behaviors are not on it yet.
  • aria-keyshortcuts can act twice on a page that already handles the same key without cancelling the event.

🤖 Generated with Claude Code

evangress and others added 22 commits November 10, 2026 18:25
The Show/Hide button wraps the field in a role="group" row, so a <small>
after the field no longer followed an input and TagBrush.css's help-text
rule stopped applying: on TagKit's sign-up page "At least 10 characters."
sat inline beside the next label. TagAction's own sheet now styles a
<small> after the password row as help text, red while the field is invalid.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The sort already tells numbers from text. A column whose body cells all
hold numbers (or a numeric <data value>) gets data-tag="num" on its
header and cells, and TagAction's sheet sets text-align: end and tabular
figures. <time> cells are not numbers ("Mar 2" passes the sort's test).
An align attribute or the page's own text-align wins. Tested with a mixed
table, a table added later, and false matches (names, "Pro 2").

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A deferred script runs after first paint on long pages, so a saved dark
scheme flashed light first. theme.js now applies data-theme at module top
level (still honoring data-tagaction="off" on <html>), and the guide, README
and demo load the script in <head> without defer on a page with a switch.
Tested: the theme is on <html> before the body is parsed.

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

Found in the screenshots: the blog template's Quarter column (Q1–Q4) and
the dashboard's order ids (#1042) lined up on the right, since the sort's
lenient test lets up to three characters lead a number. Alignment now uses
a stricter test: only a currency sign may lead.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
form.requestSubmit(), so validation and other submit handlers (htmx,
form.js's busy button) run. Following the modern-web-guidance
ime-safe-enter-submit guide, it does nothing while an input method is
composing (isComposing, or keyCode 229 for Safari's event order), and
plain Enter still types a newline. Tested with keyboard, an invalid form,
a form added later, and a composing keydown.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A button with command="--remove" removes the element its commandfor
names, so every row added with --clone can be taken out again (clones
already renumber ids and commandfor). Focus moves to the previous row's
first control, or the Add button, or the next row. The button is written
hidden (JS-only) and shown when its target exists, including in copies
added later. data-tagaction="off" on the target keeps it. Tested with
mouse, keyboard, inserted rows, and the no-JS check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A filter box now keeps a role="status" line (data-tag="filter-status")
after its table or list. When nothing matches it reads "No matches for
“x”" and shows; otherwise it holds "3 of 12 shown" for screen readers
and stays visually hidden. Empty while the box is empty. Tested by typing,
clearing, and with a filter box added later.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Marking ran once per table, so a --clone row or an htmx swap into tbody
wasn't aligned. Every added body row now asks for its table to be
checked once per batch (a microtask, so a long table isn't rescanned per
row). A marked column stays marked and new cells in it get the mark
whatever they hold; an unmarked column is re-checked, so a table that
starts empty is marked when rows arrive. Rows with a colspan are skipped
instead of turning marking off for the whole table.

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

A sign before the currency sign, and accounting parentheses, now count
for alignment. Tested with a column of all three.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The screen-reader count ("12 of 40 shown") was rewritten, and so
announced, on every keystroke. It is now written 400 ms after the last
change; "No matches" and clearing the box still update at once. Tested
that the count isn't there right after typing and arrives after.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
TagAction's sheet anchors a [data-tag="dropdown"] list to its button
(anchor-name on the button, anchor-scope on the item so several dropdowns
don't collide) and positions it fixed with position-area block-end
span-inline-start and flip fallbacks, so it flips up near the bottom edge
and to the other side near a side edge. Following the modern-web-guidance
viewport-aware-dropdowns guide, all of it is inside
@supports (position-area: block-end); without it the list keeps its
absolute place under the button. Tested: a top-bar list stays inside the
viewport under its button; a footer list near the bottom opens upward.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new behavior (shortcuts.js): one keydown listener makes the shortcut an
element declares in aria-keyshortcuts work. A field is focused ("/" for
search), anything else is clicked ("Control+K Meta+K"). Without
Control, Alt, or Meta it is ignored while typing in a field; Shift is
ignored for single characters ("?"); hidden, inert, and disabled
elements, repeats, and IME composition are skipped. Tested: "/" focuses
without typing the slash, letters type normally in a field, Control+K
and Meta+K click from inside a field, a disabled target is skipped, and
an element added later works. Demo filter box uses "/".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
<input type="file" accept="image/…"> gets the file list even without
multiple, and each chosen picture appears in it as a small <img alt="">
from an object URL; the URLs are revoked when the choice changes. Names
stay as text for the live region. Tested: thumbnail loads, a new non-
image choice removes it and revokes the URL, a non-image single input
gets no list.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A filter box with a name starts from ?name=… and writes it back with
history.replaceState as it changes (removed when empty; the #fragment
and other parameters are kept), so a filtered view survives a reload
and can be shared. Boxes without a name leave the address alone
(tested).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The words a filter box matches are highlighted with the CSS Custom
Highlight API, following the modern-web-guidance highlight-text-ranges
guide: text nodes of the shown rows are walked, Ranges collected, and
one Highlight registered as tagaction-match (only that name is replaced,
so a page's own highlights stay). TagAction's sheet styles
::highlight(tagaction-match) with the theme's highlight color, text
color, and an underline (an indicator besides color). No DOM changes;
browsers without the API show no highlight, which is not critical.
Tested in Chromium and WebKit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
New behavior (select.js): a checkbox in a <thead> cell checks or clears
the checkboxes in its column for every shown row (filtered-out rows are
left alone), shows indeterminate when only some are checked, and a
Shift-click on a row's box sets the range from the last one clicked.
It reads the table on each event, so rows added later count; toggle
switches are not row boxes. Changes dispatch input/change so other
scripts see them. The sort no longer wraps a header cell that holds a
control in its button. Tested with mouse, keyboard (Space), Shift-click,
an added row, and a switch column left alone. TagBrush.css tints checked
rows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On beforeprint every closed <details> (header-nav dropdowns and opted-out
ones excepted) opens, with name groups lifted so all can be open at once,
and afterprint restores them. A printed FAQ has its answers. Tested with
an exclusive group.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Hidden panels get hidden="until-found" where the browser supports it
(checked with 'onbeforematch' in documentElement; otherwise plain hidden),
so find-in-page reaches their text, and beforematch selects their tab. A
link to a panel or anything in it selects its tab on load and on
hashchange, as details.js does for <details>. Tested: #fragment on load
and on hashchange, the until-found attribute, and beforematch.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
form.js focused the first invalid field with focus(), whose scroll WebKit
stops a few pixels short of scroll-padding-top, leaving the field partly
under a sticky header. It now focuses with preventScroll and scrolls the
field to the middle of the window. Tested in Chromium and WebKit with a
sticky bar and the field starting right under it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A table with an id under data-tag-remember stores its sort column and
direction (localStorage, keyed by path and id like <details>) and sorts
that way on the next visit, with aria-sort set. Other tables load in
source order (tested across a reload).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Pictures the viewer can open (image links and shrunk figure images) in
the same <figure>, or else the same <section>, form a set. The viewer
then has a "2 of 5" output, Previous and Next buttons, and the arrow
keys, wrapping at the ends, updating the picture, its alt, caption, and
the dialog's label. Clicking the picture or backdrop still closes it;
the buttons don't. A picture on its own is unchanged (tested). Tested
with mouse and keyboard.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Safari throws a SecurityError when a page updates the URL more than 100
times in 30 seconds, which fast typing in a named filter box can reach.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@evangress
evangress merged commit 95267dc into main Nov 11, 2026
1 check 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