Conversation
korkt-kim
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 20, 2026 19:02
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
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.
User impact
With
min={0},max={100}andstep={3}, Slider stops at99when dragged to the right endpoint or operated with End. Its accessible maximum is still100, but neither input method can select it.Problem and solution fit
The value is rounded to the step grid before it is clamped. At the endpoint,
100rounds to99; clamping leaves it there because it is already within bounds. A second edge case appears when the current value is an off-grid maximum: subtracting a step and then rounding takes100 → 97 → 96, skipping the adjacent value99.The fix includes the explicit maximum in nearest-value selection and makes arrow keys choose the adjacent step in their direction. The final interval may be shorter than
step:96 → 99 → 100, and back through99rather than skipping it.Expected behavior and authority
maxas its maximum value. The existing implementation already permits an off-grid maximum when rounding overshoots and clamping brings it back:min=0, max=100, step=6reaches100today. This restores consistent endpoint reachability rather than making it depend on the remainder.maxas allowed; it does not claim that WCAG requires this particular step policy or that it matches native HTML range sanitization.Smallest restoration
Slider.tsx: share nearest-step/endpoint selection across pointer and keyboard updates, and select the adjacent step before applying bounds on arrow-key movement. Existing decimal cleanup, range separation, and callback handling stay in place. No new props, styling, dependencies, or default values.Three regression tests cover single-value keyboard/callback behavior, range separation and ARIA bounds, and pointer dragging to both
100and the neighboring99.Evidence
Reproduce
step=3.aria-valuemax="100".AS-IS / TO-BE: real Chrome 153 keyboard and mouse input, published Storybook versus this branch at
b46a9c0ec8. The diagnostic panels are injected by the probe; their values are read from the live DOM after each action. They are not product UI.Before recording · After recording · Probe, raw observations, and test logs
Representative unchanged keyboard paths, checked on both builds:
min=0, max=100, step=10100 → 90min=0, max=100, step=6100 → 96min=1, max=100, step=3100 → 97min=-1, max=100, step=3100 → 98The published deployment is not asserted to be the exact base commit. For regression proof, the same new tests were run with a temporary Vite hook substituting only Slider's source:
f138ed997b99instead of100currentValue ± steparrow logic96instead of99The probe configs and logs are linked above. No live source was swapped, and the tested source hashes match the committed files. These are scoped Chromium checks, not a full assistive-technology or cross-browser audit.
Scope
Testing
pnpm exec vitest run packages/core/src/Slider/Slider.test.tsx— 68 passed.pnpm test --maxWorkers=4— 17,113 passed, 50 skipped (GNUcpon PATH; see note below).pnpm -F @astryxdesign/core typecheck— passed.pnpm -F @astryxdesign/core typecheck:docs— passed.pnpm build— passed.pnpm lint:strict— 0 errors; 84 warnings outside Slider.The first full run on macOS passed 17,105 tests but hit two unrelated setup-fixture failures because BSD
cpdoes not support--reflink=auto. The entire suite was rerun with GNUcp9.11 on PATH usingpnpm test --maxWorkers=4; no test exclusions or repository fixes were added for that environment issue.