Skip to content

Modernisation, standardisation, hardening, bug fixes, and nitpicks - #339

Merged
mjbp merged 18 commits into
masterfrom
users/mick/review
Sep 11, 2026
Merged

mjbp merged 18 commits into
masterfrom
users/mick/review

Conversation

@mjbp

@mjbp mjbp commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

mjbp added 17 commits August 26, 2026 16:05
- Tab-trap matches event.key, not deprecated keyCode
- Reject-all clears cookies; accept/form-submit no longer wipe
- Replace hardcoded TLD lists with a browser-probe registrable-domain
  finder (+ short private-suffix list), memoised into state
- readCookie preserves base64 padding; unify template model shape
- messageTemplate uses role-valid markup; drop redundant Boolean checks
Dev servers use port 'auto'; the Playwright run picks a free port per
package (memoised into an env var so runner and workers agree) and passes
it to the spawned server via --port. Removes hardcoded ports and the
redundant per-package playwright.rspack.config.js files.
- Read srcset/sizes from the item model so responsive images render
- Paint cached slides so reopened/preloaded galleries aren't blank
- Escape attribute sinks (src/alt/aria-label) to prevent injection
- Lock body scroll and mark the background inert while open
- Focus the close button on open, restore focus/inert order on close
- Configurable heading level (default h2), scoped status live region
- Migrate deprecated keyCode to e.key; accept JS objects in single mode
- Fix README init examples and add regression tests
Pass IntersectionObserverEntry to callback, add disconnect(), unobserve instead of disconnect(node), honour replay with default unload, harden getSelection, feature-detect IntersectionObserver, drop unused raf-throttle. Breaking change: v2.0.0.
- findSpies: resolve via getElementById, drop undefined holes
- Add destroy() to disconnect observers and remove the scroll listener
- Set aria-current on active links; swap dead callback option for
  scroll-spy.active/.inactive events
- Align getSelection, remove unused raf-throttle dependency
- Fix README API/example; add tests and de-flake Playwright counts
Apply native field-sizing:content when supported; run the JS path only as a
fallback. Add destroy() teardown, ResizeObserver reflow on width/reveal,
box-model-aware sizing and scroll-x preservation. Fix false-positive API test,
add fallback/native e2e coverage, and rewrite docs to lead with the native CSS.
- Guard init against missing data-toggle and id instead of throwing
- Coerce data-attribute settings so "false" and numeric values behave
- Add destroy(), with stable handlers so listeners can be removed
- Use e.key, tighten the tab trap, separate focus from trapTab and
  restore focus on close
- Route closeOnBlur/closeOnClick through the toggle lifecycle
- Return an empty array when no elements match the selector
- Add dom unit tests and document destroy, animating classNames
  and data-attribute typing
…kages

- data-attribute-wins settings precedence via a shared typed coerceSettings
  (toggle/modal/tabs/autocomplete)
- match event.key instead of keyCode (autocomplete); centralise KEYS
- Array.from for NodeList casts; unify getSelection across packages
- generate fallback ids so aria-controls/aria-labelledby are never null
  (toggle target, tabs)
- align FOCUSABLE_ELEMENTS (tabs, modal-gallery); tabs empty selector returns []
- fix modal-gallery focus restore on close and make its tab trap fully managed
- optional catch binding in skip
@mjbp
mjbp merged commit 0277642 into master Sep 11, 2026
1 check passed
@mjbp
mjbp deleted the users/mick/review branch September 11, 2026 14:38
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.

3 participants