diff --git a/EXPECTATIONS.md b/EXPECTATIONS.md new file mode 100644 index 0000000..255b0d2 --- /dev/null +++ b/EXPECTATIONS.md @@ -0,0 +1,117 @@ +# What visitors expect from each tag + +A work list for the Tag family: what people already expect from a semantic element or a combination of elements, and the CSS (TagBrush.css) or JavaScript (TagAction) that would deliver it. Only gaps are listed; anything in the guides today is left out. Written November 10, 2026 against TagBrush.css 1.2.0 + unreleased, TagAction 0.2.0 + unreleased. + +## For the implementer + +- Every repo's `CLAUDE.md` and the family `Spec.md` still apply: no classes as API, hooks in the order native → ARIA → `data-tag*`, pages work without JavaScript, one PR per pattern (TagBrush) with CHANGELOG, README, `llms.txt` and demo in the same change. +- Budgets: TagBrush.css is 11.0 of 15 KB gzipped, TagAction 9.0 of 15 KB, the TagBrush guide index 3,038 of 4,000 tokens. Each item below must fit in one guide line. +- Each CSS pattern needs a false-match test (nearby markup it must leave alone). Each behavior needs mouse, keyboard, dynamic-insertion and no-JS tests. +- New attributes and commands must be added to TagCheck's vocabulary (`unknown-attribute`, `unknown-command`) in the same round. +- Before writing an item marked **mwg**, retrieve that guide: `npx -y modern-web-guidance@latest retrieve `. Follow its fallback rules; do not assume browser support from memory. +- Decided November 10, 2026: section 2 ships as TagBrush.css 2.0 (the new look is the default, no opt-in variable), and the sticky header hook is `
`. + +## 1. Defects (fix first) + +Found by rendering TagKit's templates with the local builds. + +| # | Where | What happens | Fix | +|---|---|---|---| +| D1 | TagAction `password.js` | The Show button wraps the input in a `role="group"` div, so a help `` after the field is no longer next to it. In `signup.html` "At least 10 characters." lands inline beside the next label. The validation message placement ("a `` right after the field") likely breaks the same way. | Move a following `` (and the message element) so it follows the group, or look past the group when placing. Test with the sign-up template. | +| D2 | TagBrush stat tiles | `−0.4%` in a `
` tile is struck through on a red highlight, so a drop reads as a deleted value. `` is a green highlight. | In `dl > div`, `ins` and `del` are plain colored text (success, error), no line, no background, with `▲`/`▼` before them (`content: "▲ " / ""`). Elsewhere unchanged. | +| D3 | Tables | Only cells holding a lone `` align right. In the blog template "Customers" (42, 118) is left-aligned next to a right-aligned "Revenue", and no numeric header lines up with its column. | TagAction's sort already knows which columns are numeric: mark those `th` and `td` (`data-tag="num"`), and style them in TagAction's own sheet: `text-align: end; font-variant-numeric: tabular-nums`. An author's `align`/`text-align` wins. | +| D4 | TagAction `theme.js` | The saved theme is applied when the deferred script runs, after first paint on long pages: a flash of the other scheme. | Apply `data-theme` at module top level (before `start()`), and say in the guide that a page with a theme switch loads the script without `defer`. | +| D5 | Page footer columns | Columns bunch at the start and leave half the row empty. | The leading paragraph takes the free space; the `