refactor: replace hardcoded aria-labels with i18n keys, add common.close/remove/home
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user