diff --git a/webui.html b/webui.html index c8985bb..8ca3ac6 100644 --- a/webui.html +++ b/webui.html @@ -363,18 +363,21 @@ function playClip(i) { + '&start=' + cs.toFixed(1) + '&end=' + ce.toFixed(1); a.play().catch(() => {}); // Label = wall-clock time of occurrence (absStart from the filename clock); - // falls back to in-file offsets for non-standard filenames. + // falls back to in-file offsets for non-standard filenames. The visible + // label and the screen-reader announcement use one identical string: + // "17:09:56 to 17:09:57 · +30 dB (30 / 426)". const when = c.absStart != null ? `${fmtClock(c.absStart)} to ${fmtClock(c.absStart + (c.end - c.start))}` : `${fmtDur(c.start)} to ${fmtDur(c.end)}`; + const score = c.score != null ? ` · +${Math.round(c.score)} dB` : ''; + const text = `${when}${score} (${i + 1} / ${clipQueue.length})`; const label = document.getElementById('clip-label'); - label.textContent = `${when} (${i + 1} / ${clipQueue.length})`; - label.title = `${c.filename} @ ${fmtDur(c.start)}–${fmtDur(c.end)}` - + (c.score != null ? ` · +${Math.round(c.score)} dB` : ''); + label.textContent = text; + label.title = `${c.filename} @ ${fmtDur(c.start)}–${fmtDur(c.end)}`; document.getElementById('clip-bar').hidden = false; document.body.classList.add('clip-open'); setCutFields(c.fileIdx, c.start, c.end); - announce(`Clip ${i + 1} of ${clipQueue.length}: ${when}`); + announce(text); } function hideClipBar() {