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 @@
Version 0.0.0 ist verfugbar. Jetzt herunterladen?
@@ -48,7 +48,7 @@Nutze Variablen fur Dateinamen und prufe das Ergebnis als Live-Vorschau.
diff --git a/src/renderer-locale-de.ts b/src/renderer-locale-de.ts index f9bbc5c..833a519 100644 --- a/src/renderer-locale-de.ts +++ b/src/renderer-locale-de.ts @@ -351,7 +351,8 @@ const UI_TEXT_DE = { autoVodScanEmpty: 'Keine neuen VODs gefunden.', autoRecordScanTriggered: 'Manueller Scan: {count} Live-Aufnahme(n) gestartet.', autoRecordScanEmpty: 'Manueller Scan: kein Streamer ist gerade live.', - liveNowTooltip: 'Aktuell live auf Twitch' + liveNowTooltip: 'Aktuell live auf Twitch', + modalCloseAria: 'Dialog schliessen' }, vods: { noneTitle: 'Keine VODs', diff --git a/src/renderer-locale-en.ts b/src/renderer-locale-en.ts index 34d3643..8824b08 100644 --- a/src/renderer-locale-en.ts +++ b/src/renderer-locale-en.ts @@ -351,7 +351,8 @@ const UI_TEXT_EN = { autoVodScanEmpty: 'No new VODs found.', autoRecordScanTriggered: 'Manual scan: {count} live recording(s) started.', autoRecordScanEmpty: 'Manual scan: no streamers currently live.', - liveNowTooltip: 'Currently live on Twitch' + liveNowTooltip: 'Currently live on Twitch', + modalCloseAria: 'Close dialog' }, vods: { noneTitle: 'No VODs', diff --git a/src/renderer-texts.ts b/src/renderer-texts.ts index a7e48e6..c7f42d5 100644 --- a/src/renderer-texts.ts +++ b/src/renderer-texts.ts @@ -26,6 +26,12 @@ function setText(id: string, value: string): void { if (node) node.textContent = value; } +function setAriaLabelAll(selector: string, value: string): void { + document.querySelectorAll(selector).forEach((el) => { + el.setAttribute('aria-label', value); + }); +} + function setPlaceholder(id: string, value: string): void { const node = document.getElementById(id) as HTMLInputElement | null; if (node) node.placeholder = value; @@ -236,6 +242,10 @@ function applyLanguageToStaticUI(): void { setText('autoVodMaxAgeHoursLabel', UI_TEXT.static.autoVodMaxAgeHoursLabel); setText('btnAutoVodScanNow', UI_TEXT.static.autoVodScanNow); setText('btnAutoRecordScanNow', UI_TEXT.static.autoRecordScanNow); + + // Localize the modal close-button aria-label. The buttons share a + // .modal-close-localizable class so one call updates all five. + setAriaLabelAll('.modal-close-localizable', UI_TEXT.streamers.modalCloseAria); setText('backupCardTitle', UI_TEXT.static.backupCardTitle); setText('backupCardIntro', UI_TEXT.static.backupCardIntro); setText('btnExportConfig', UI_TEXT.static.exportConfig);