Modernisation, standardisation, hardening, bug fixes, and nitpicks - #339
Merged
Merged
Conversation
- 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
sarah-richards-stormid
approved these changes
Aug 31, 2026
catvine-stormid
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.