Audit fixes: a11y, gesture correctness, math edge cases
- Keyboard focus-visible ring on all controls (WCAG 2.4.7), suppressed for pointer grabs; focusRing prop to customize or disable - aria-orientation on track modes; data-dragging/-disabled/-readonly/ -focus-visible state attributes; disabled dims, readOnly drops the grab cursor - Escape cancels a drag and restores the pre-gesture value - Controlled mode no longer desyncs when the parent rejects onChange - Second concurrent pointer can no longer hijack a drag session; drags cancel when disabled/readOnly flips mid-gesture - Wheel: onChangeStart symmetry, settle flush on unsubscribe, dominant- axis direction (fixes macOS Shift+scroll reversal), ignored mid-drag - Shift+wheel and fine multipliers now work on stepped/values knobs - Fader/LEDFader track mapping inset-aligned with handle travel (no value jump when grabbing the cap); LEDFader zones sorted - roundTo no longer returns NaN for exponential-notation values; logTaper falls back to linear for invalid ranges; decimalsFromStep shaves float noise; findClosest([]) returns the input - Double-click reset brackets with onChangeStart/End - MetalKnob honors showValue/unit/format; VintageKnob omits them from its type; TickLabels extracted as a public primitive - SegmentDisplay: letters/hex charset, dash overflow instead of 888
This commit is contained in:
parent
60a02cb1db
commit
da352d3695
13 changed files with 378 additions and 82 deletions
|
|
@ -135,8 +135,10 @@ export const Playground: React.FC = () => {
|
|||
return <MetalKnob size={cfg.size} {...common} />;
|
||||
case 'rubber':
|
||||
return <RubberKnob size={cfg.size} {...common} />;
|
||||
case 'vintage':
|
||||
return <VintageKnob size={cfg.size} {...common} />;
|
||||
case 'vintage': {
|
||||
const { showValue: _sv, unit: _u, ...vintageProps } = common;
|
||||
return <VintageKnob size={cfg.size} {...vintageProps} />;
|
||||
}
|
||||
case 'led':
|
||||
return <LEDKnob size={cfg.size} {...common} />;
|
||||
case 'neon':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue