Frontend: structured error handling, state fixes, accessibility, i18n

- Enhance fetchWithAuth with auto-401, retry w/ exponential backoff, timeout
- Remove ~40 manual 401 checks across 10 feature files
- Fix state: brightness cache setter, manual edit flag resets, static import
- Add ARIA: role=dialog/tablist, aria-modal, aria-labelledby, aria-selected
- Add focus trapping in Modal base class, aria-expanded on hint toggles
- Fix WCAG AA color contrast with --primary-text-color variable
- Add i18n pluralization (CLDR rules for en/ru), getCurrentLocale export
- Replace hardcoded strings in dashboard.js and profiles.js
- Add data-i18n-aria-label support, 20 new keys in en.json and ru.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 01:18:29 +03:00
parent 2b90fafb9c
commit 3ae20761a1
41 changed files with 355 additions and 248 deletions

View File

@@ -16,7 +16,7 @@ header {
h1 {
font-size: 2rem;
color: var(--primary-color);
color: var(--primary-text-color);
}
h2 {
@@ -103,7 +103,7 @@ h2 {
.health-latency {
font-size: 0.7rem;
font-weight: 400;
color: #4CAF50;
color: var(--primary-text-color);
margin-left: auto;
padding-left: 8px;
opacity: 0.85;
@@ -140,7 +140,7 @@ h2 {
}
.tab-btn.active {
color: var(--primary-color);
color: var(--primary-text-color);
border-bottom-color: var(--primary-color);
}
@@ -190,7 +190,7 @@ h2 {
}
.footer-content a {
color: var(--primary-color);
color: var(--primary-text-color);
text-decoration: none;
transition: opacity 0.2s;
}