Seletor de intervalo sobre histograma (dois cursores, toque, teclado, playhead)

オープン
#1,219 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
html, typescript

調査の方向性

Start from AudioPlayer.svelte:17-25, the existing single-cursor slider with role="slider" and its arrow/Home/End handling, and reuse that key handling as the template. Build the new two-handle component alongside it: pointer capture on the track (pointerId in pointermove), clamping so start <= end, and ARIA value attributes updated per index. Verify against the four acceptance boxes at 390px, with focus on each handle, and with reduced motion forced. The AC paths and the F-02 defect are in a private repo and cannot be read, so treat them as reference only.

索引モデルが issue の本文から書いたものです。

説明

area:a11y area:components enhancement

Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)

Problema

O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.

O que a lib já oferece (para não duplicar) e o que falta

(leitura de origin/main) AudioPlayer tem forma de onda com role="slider", setas, Home e End, e arrasto (AudioPlayer.svelte:17-25), mas é um cursor único (playhead). Não há seletor de intervalo com dois cursores sobre histograma.

Referência no AC

Caminhos do repo AC (repo privado, só caminho):

apps/web/src/components/geography/map/overlays/player/waveform-slider.tsx:93-100 (role="slider" com eventos de mouse), :110-116 (barras tocadas e playhead), player/player-header.tsx:26-27.

Defeitos do AC (verificados por leitura do código): (leitura) ver F-02.

Proposta

<RangeHistogram values={number[]} bind:start bind:end playhead={n} onchange> com dois role="slider", teclado (setas, PageUp/Down, Home/End), pointer events (toque) e touch-action: none na faixa.

Critério de aceite (testável)

  • Tocar na faixa seleciona a alça mais próxima e arrasta com dedo (pointermove com pointerId), também em 390 px.
  • Com foco nas alças, setas movem uma barra; aria-valuenow, aria-valuemin e aria-valuemax refletem o índice.
  • start <= end sempre; tentar cruzar trava na outra alça.
  • Playhead com playing=true marca barras até o índice com classe de estado, e prefers-reduced-motion desliga a transição de cor.

Mãe: #1089

主要言語
TypeScript
スター
6
フォーク
3
平均マージ
5時間 21分
マージ済み PR(30日)
378

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeatlasdev/ui のほかの issue

codeatlasdev/ui の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。