Repository navigation
Make the equalizer sliders keyboard and screen reader operable - #1370
Open
captbaritone wants to merge 2 commits into
Open
captbaritone wants to merge 2 commits into
captbaritone wants to merge 2 commits into
Conversation
✅ Deploy Preview for tourmaline-kringle-c98715 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +602 B (+0.12%) Total Size: 491 kB 📦 View Changed
|
captbaritone
force-pushed
the
a11y-sliders
branch
3 times, most recently
from
October 15, 2026 16:59
07978ab to
5d6adc5
Compare
The preamp and EQ band sliders use the custom VerticalSlider (a div), so they had no role, could not be focused, and ignored the keyboard. VerticalSlider now accepts an optional label. When provided, it renders as a focusable role="slider" with aria-orientation, aria-valuenow (0-100, up is higher) and aria-valuetext, and handles Arrow keys, PageUp/PageDown, Home and End. The playlist scrollbar, which also uses VerticalSlider, passes no label and is unchanged. Band passes labels like "60 Hz", "1 kHz" and "Preamp", value text like "+6.0 dB", and a keyboard step of 1 dB.
captbaritone
force-pushed
the
a11y-sliders
branch
from
October 15, 2026 17:18
5d6adc5 to
b8b1b99
Compare
This branch has not been deployed
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.
The preamp and the ten EQ band sliders are built on the custom
VerticalSlider, adivwith pointer handlers. It's a custom component because a rotated<input type="range">can't have a pixel-perfect handle. As a result these sliders have no role, can't be focused, and ignore the keyboard.Changes
VerticalSlidertakes a new optionallabelprop. When it's provided, the slider:role="slider"witharia-label,aria-orientation="vertical",aria-valuemin/max0–100,aria-valuenow(up is higher) and an optionalaria-valuetextkeyboardStep(default 1%), PageUp/PageDown by 10%, Home goes to the minimum and End to the maximumonBeforeChange/onAfterChangecallbacks.onBeforeChangefires on keydown andonAfterChangeon the matching keyup, so the marquee shows "EQ: 60HZ +6.0 DB" while a key is held, just as it does while dragging.Without
labelnothing changes. The playlist scrollbar also usesVerticalSlider, and it stays out of the tab order.Bandpasses:Rendering is unchanged. The element is the same
div, and Webamp's existing#webamp *:focus { outline: 0 }means focus draws nothing unless the opt-in focus indicator (#1368) is enabled.Testing
VerticalSlider.test.tsxcovers:onAfterChangeon a stray keyup, e.g. from tabbing in)bandValueTextcases inBand.test.js.tsc,eslint,prettier --checkandvitest run(217 passed) pass locally.