From cbefdc15c4f676eb166d9b06a8c5fc28378b5986 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 1 Mar 2026 14:41:13 +0100 Subject: [PATCH] [docs](trx-frontend): rename audio control labels Update the web audio control labels in the markup and initialize the same labels from JavaScript for consistency. Co-authored-by: OpenAI Codex Signed-off-by: Stan Grams --- .../trx-frontend/trx-frontend-http/assets/web/app.js | 11 +++++++++++ .../trx-frontend-http/assets/web/index.html | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js index 91711f3..3c09125 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/app.js @@ -2681,6 +2681,8 @@ sigClearBtn.addEventListener("click", () => { // --- Audio streaming --- const rxAudioBtn = document.getElementById("rx-audio-btn"); const txAudioBtn = document.getElementById("tx-audio-btn"); +const RX_AUDIO_LABEL = "Play Audio"; +const TX_AUDIO_LABEL = "Transmit Audio"; const audioStatus = document.getElementById("audio-status"); const audioLevelFill = document.getElementById("audio-level-fill"); const audioRow = document.getElementById("audio-row"); @@ -2722,6 +2724,15 @@ const MAX_RX_BUFFER_SECS = 0.25; const TARGET_RX_BUFFER_SECS = 0.04; const MIN_RX_JITTER_SAMPLES = 512; +if (rxAudioBtn) { + rxAudioBtn.textContent = RX_AUDIO_LABEL; + rxAudioBtn.setAttribute("aria-label", RX_AUDIO_LABEL); +} +if (txAudioBtn) { + txAudioBtn.textContent = TX_AUDIO_LABEL; + txAudioBtn.setAttribute("aria-label", TX_AUDIO_LABEL); +} + function setAudioLevel(levelPct) { if (!audioLevelFill) return; const clamped = Math.max(0, Math.min(100, Number.isFinite(levelPct) ? levelPct : 0)); diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html index a68c5e4..974659e 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/index.html @@ -240,8 +240,8 @@
Audio
- - + +