diff --git a/skills/wcstack-app/references/io-node-catalog.md b/skills/wcstack-app/references/io-node-catalog.md index 25b237c..6c171c0 100644 --- a/skills/wcstack-app/references/io-node-catalog.md +++ b/skills/wcstack-app/references/io-node-catalog.md @@ -45,7 +45,7 @@ Sources: each package's README (ja preferred) plus the `static wcBindable` / `st | **broadcast** | `` | `name`(live: change reopens the channel) `manual` | `message` (no self-echo; structured clone) | `open` `post` `close` | | **worker** | `` | `src` `type` `name` `manual` `keep-alive`(thread outlives disconnect — caller must `terminate` or it leaks) `restart-on-error` `max-restarts`(cumulative lifetime budget) `restart-interval` | `message` `running` | `start`(no-op while the same `src` runs — `terminate`→`start` to apply option changes) `post` `terminate` | | **timer** | `` | `interval`(default 1000; live while running only — frozen while stopped/paused) `once` `repeat` `immediate` (all read at `start`) `manual` `trigger` | `tick`(counter) `elapsed`(ms) `running` `trigger` | `start` `stop` `reset` `pause` `resume` (`stop`→`start` continues `tick`/`elapsed` — only `reset` zeroes) | -| **raf** | `` | `once` `repeat` (read at `start`) `manual` `trigger` | `tick` `elapsed` `dt` `running` `suspended`(hidden tab: `suspended` true, counters freeze, `running` stays true) `trigger` — `elapsed` counts active time only, not wall-clock | `start` `stop` `reset` `pause` `resume` (`stop`→`start` continues counters — only `reset` zeroes) | +| **raf** | `` | `once` `repeat` (read at `start`) `manual` `reduced-motion`(v1.32+: `"pause"`\|`"run"`, default `"run"` — opt-in `prefers-reduced-motion` gate, live-subscribed; while engaged the loop stops and `suspended` reports it; resumes with `dt=0` when the preference clears. Use for motion-for-motion's-sake loops, not functional output) `trigger` | `tick` `elapsed` `dt` `running` `suspended`(two causes: hidden tab, or the reduced-motion gate — counters freeze, `running` stays true) `trigger` — `elapsed` counts active time only, not wall-clock | `start` `stop` `reset` `pause` `resume` (`stop`→`start` continues counters — only `reset` zeroes) | | **debounce** | `` / `` (`wcs-throttle:*` events) | `source` (value-surface input; NO same-value guard — every write restarts the wait, and the initial bind write starts a cycle: throttle emits `value` immediately at startup) `wait` `max-wait` `leading`(debounce: opt-in attr, default off; throttle: default on, opt-out `no-leading`) `trailing`(default on; opt-out `no-trailing` — a bare `trailing` attribute is inert) | `value`(settled value) `fired` `pending` | `trigger` `cancel` `flush` (commands — no momentary trigger property here) | | **clipboard** | `` | `monitor` | `text` `items` `loading` `readPermission` `writePermission` `monitoring` `copied` `cut` (both carry the document selection text, not the clipboard payload) `pasted` | `writeText` `write` `readText` `read` `startMonitor` `stopMonitor` (write requires a user gesture) | | **geolocation** | `` | `high-accuracy` `timeout` `maximum-age` `watch` `manual` `trigger` (attributes are read at connect time) | `position` `latitude` `longitude` `accuracy` `coords` `timestamp` `watching` `loading` `permission` | `getCurrentPosition` `watchPosition` `clearWatch` | diff --git a/skills/wcstack-app/references/router-and-scaffold.md b/skills/wcstack-app/references/router-and-scaffold.md index 4fd9db0..365ea16 100644 --- a/skills/wcstack-app/references/router-and-scaffold.md +++ b/skills/wcstack-app/references/router-and-scaffold.md @@ -202,7 +202,8 @@ Resolution order: (1) `basename` attribute → (2) derived from `` ``` - Converted to an ``. If `to` starts with `/`, it is a route path (basename auto-prepended); otherwise it is treated as an external URL. -- The `active` CSS class is automatically applied on current-location match: `a.active { font-weight: bold; }` +- The `active` CSS class is automatically applied on current-location match: `a.active { font-weight: bold; }` — and (v1.32+) `aria-current="page"` is set/removed alongside it. +- **Attribute forwarding (v1.32+)**: at anchor creation, all `aria-*` attributes plus `title` / `rel` / `target` / `download` / `hreflang` are copied from the host to the generated ``; only the fixed five keep tracking later changes. **Dynamic `aria-*` never reaches the anchor — including `data-wcs="attr.aria-label: …"` on the wcs-link itself** (the binder writes the host after the copy). Write `aria-*` on `` as static attributes. ### Programmatic navigation @@ -226,6 +227,14 @@ export default { - `navigateUrl` is **self-resetting**: the router sets it back to `null` when navigation completes, so re-assigning the same path navigates again. - `path` is output-only, so never write it back from state (the router is the authority. The current value is read when the binding is established, so deep links are never missed). +### Accessibility (v1.32+: scroll repair + opt-in focus / announce) + +- Scroll and focus reset follow the Navigation API defaults (push scrolls to top, traverse restores, focus resets to `[autofocus]` / body). The pushState fallback path matches: scroll-to-top after a **committed** push; a guard-rejected navigation does nothing; `popstate` never scrolls (the browser's `scrollRestoration` owns traverse). Nothing to configure. +- Opt-in policies on `` (both inert on first render and on guard rejection): + - `focus="heading"` — after a committed navigation, focuses the first `h1`–`h6` of the **leaf** route's content (adds `tabindex="-1"` if needed). No heading → nothing happens, so give every route a heading when you opt in. + - `announce="title"` — writes the commit-time `document.title` into a router-owned `role="status"` live region. Pair it with `` per route. A bound title (`<title data-wcs>`) may still be stale at commit; title changes outside navigation are not re-announced. +- Recommended default for an SPA scaffold: `<wcs-router focus="heading" announce="title">` plus one `<h1>` and one `<wcs-head><title>` per route. + ## 6. autoloader ### Import Map + element placement