From 1017160c3e9c85dcf7f6b4b91833e019cf6380bf Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Fri, 5 Jun 2026 14:53:04 +0100 Subject: [PATCH 1/2] Expose the waveform as a keyboard-operable, ARIA slider The waveform seek surface was only operable by mouse: the container is tabindex="-1" until clicked, and the waveform had no role or ARIA value attributes, so keyboard-only and screen-reader users couldn't discover or operate seeking (WCAG 2.1.1, 4.1.2). Mark .waveform-container as role="slider", make it focusable, keep aria-valuemin/max/now/valuetext in sync with playback, and handle the standard slider keys (Arrow/Page/Home/End) to seek. Works in both self and external audio modes. New options: accessibleSeek (default true, opt-out) and seekLabel (accessible name, falls back to the track title). Closes #8 --- README.md | 2 + dist/waveform-player.css | 2 +- dist/waveform-player.esm.js | 4 +- dist/waveform-player.js | 139 ++++++++++++++++++++++++++++++ dist/waveform-player.min.js | 4 +- src/css/waveform-player.css | 6 ++ src/js/core.js | 163 ++++++++++++++++++++++++++++++++++++ src/js/themes.js | 7 ++ 8 files changed, 322 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ca8605a..8b1d115 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,8 @@ Choose from 6 built-in styles: | `waveform` | array | `null` | Pre-generated waveform data | | `enableMediaSession` | boolean | `true` | Enable system media controls | | `audioMode` | string | `'self'` | `'self'` (own `