refactor: replace hardcoded aria-labels with i18n keys, add common.close/remove/home

This commit is contained in:
2026-02-05 15:21:28 +01:00
parent 715ab3ea13
commit 43add27732
9 changed files with 20 additions and 11 deletions

View File

@@ -37,10 +37,10 @@ class ErrorBoundary extends HTMLElement {
this.innerHTML = /* html */`
<div class="error-boundary">
<div class="error-icon">⚠️</div>
<h3 class="error-title">${t('error.title') || 'Etwas ist schiefgelaufen'}</h3>
<h3 class="error-title">${t('error.title')}</h3>
<p class="error-message">${escapeHTML(errorMessage)}</p>
<button class="btn btn-primary error-retry" type="button">
${t('error.retry') || 'Erneut versuchen'}
${t('error.retry')}
</button>
</div>
`
@@ -131,7 +131,7 @@ function showErrorToast(message) {
toast.innerHTML = /* html */`
<span class="error-toast-icon">⚠️</span>
<span class="error-toast-message">${escapeHTML(message)}</span>
<button class="error-toast-close" aria-label="Schließen">×</button>
<button class="error-toast-close" aria-label="${t('common.close')}">×</button>
`
document.body.appendChild(toast)