From b37244cccf090af379013f8bd18197b5d24a2b36 Mon Sep 17 00:00:00 2001 From: xRangerDE Date: Mon, 11 May 2026 02:00:28 +0200 Subject: [PATCH] a11y+i18n: localize modal close aria-labels + strip dead modal title fallbacks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two related artifacts from the 4.6.31 a11y pass. aria-label="Close" was hardcoded English on all five modal-close X buttons — anyone running the German locale would still hear "Close button" from their screen reader. Added a shared .modal-close-localizable class on each X, plus a streamers.modalCloseAria locale string ("Close dialog" / "Dialog schliessen"), plus a small setAriaLabelAll helper in renderer-texts that resolves the class via querySelectorAll and applies the localized label in one shot. Now all five modals announce in the active language. While editing the modal headers, also removed the dead "Stream events" and "Chat replay" English fallback text from eventsViewerTitle and chatViewerTitle. Both h2s get their textContent overwritten the instant openEventsViewer / openChatViewer is called (with the streamers name or a UI_TEXT fallback), so the inline English text was never user-visible past first-paint and only mattered to a screen reader if a user managed to focus an unopened modal. Empty

is cheaper and removes the i18n drift. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/index.html | 14 +++++++------- src/renderer-locale-de.ts | 3 ++- src/renderer-locale-en.ts | 3 ++- src/renderer-texts.ts | 10 ++++++++++ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/index.html b/src/index.html index fc3a9ff..cfdf576 100644 --- a/src/index.html +++ b/src/index.html @@ -20,7 +20,7 @@