Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Screen readers: week and month arrows, steppers, accent colours and the weigh-in delete are read in the UI language
Duarte Santos569363c9e4be
diff --git a/frontend/src/components/QrCanvas.jsx b/frontend/src/components/QrCanvas.jsxindex 543e0527d..edf81dac7 100644--- a/frontend/src/components/QrCanvas.jsx+++ b/frontend/src/components/QrCanvas.jsx@@ -1,5 +1,6 @@import { useEffect, useRef, useState } from 'react'import { renderQrToCanvas } from '../lib/qr.js'+import { t } from '../lib/i18n.js'// Renders a gym check-in code as a QR image on a <canvas>. lean-qr draws one module per pixel;// CSS (.qr-canvas) scales it up with image-rendering: pixelated so it stays razor-sharp at any@@ -27,7 +28,7 @@ export default function QrCanvas({ value, size = 240, className = '' }) {ref={ref}className={'qr-canvas ' + className}style={{ width: size, height: size, opacity: ok ? 1 : 0 }}- aria-label="QR code"+ aria-label={t('QR code')}/>)}diff --git a/frontend/src/components/ui.jsx b/frontend/src/components/ui.jsxindex 3aa7f5473..763063ef0 100644--- a/frontend/src/components/ui.jsx+++ b/frontend/src/components/ui.jsx@@ -15,6 +15,7 @@import { useRef, useState, useEffect, useCallback, forwardRef } from 'react'import Icon from './Icon.jsx'+import { t } from '../lib/i18n.js'/* ============================ text ============================ */@@ -76,7 +77,7 @@ export const SearchField = forwardRef(function SearchField({ value, onChange, on<Icon name="magnifier" className="lead" /><input ref={ref} className="field" value={value} onChange={onChange} {...rest} />{!!value && (- <button className="clear" onClick={onClear} aria-label="Clear">+ <button className="clear" onClick={onClear} aria-label={t('Clear')}><Icon name="xmark" /></button>)}@@ -170,12 +171,12 @@ export function Stepper({ value, step = 1, min = 0, max = Infinity, onChange, de})const inner = (<div className={'stp ' + className}>- <button {...holdProps(-1)} aria-label="Decrease"><Icon name="minus" /></button>+ <button {...holdProps(-1)} aria-label={t('Decrease')}><Icon name="minus" /></button><span className="val" onBlur={() => { const v = +value || 0; if (clamp(v) !== v) onChange(clamp(v)) }}><NumberField value={value} decimal={decimal} onChange={onChange} aria-invalid={invalid ? 'true' : undefined} />{unit && <i>{unit}</i>}</span>- <button {...holdProps(1)} aria-label="Increase"><Icon name="plus" /></button>+ <button {...holdProps(1)} aria-label={t('Increase')}><Icon name="plus" /></button></div>)if (!label) return innerdiff --git a/frontend/src/lib/format-names.test.js b/frontend/src/lib/format-names.test.jsindex d9305b1e5..bf053e220 100644--- a/frontend/src/lib/format-names.test.js+++ b/frontend/src/lib/format-names.test.js@@ -27,3 +27,14 @@ describe('exerciseNameText', () => {expect(exerciseNameText(bench)).toBe('Bankdrücken mit Langhantel')})})++// QA 1.3.9: the accent swatches' screen-reader names were the internal keys ("lime", "sky").+describe('ACCENT_NAMES', () => {+ it('names every accent, in every language pack', async () => {+ const { ACCENTS, ACCENT_NAMES } = await import('./format.js')+ expect(Object.keys(ACCENT_NAMES).sort()).toEqual(Object.keys(ACCENTS).sort())+ const packs = import.meta.glob('../locales/*.js', { eager: true, import: 'default' })+ for (const [file, pack] of Object.entries(packs))+ for (const name of Object.values(ACCENT_NAMES)) expect(pack[name], `${file}: ${name}`).toBeTruthy()+ })+})diff --git a/frontend/src/lib/format.js b/frontend/src/lib/format.jsindex 3be41b9c5..e328ff72a 100644--- a/frontend/src/lib/format.js+++ b/frontend/src/lib/format.js@@ -111,6 +111,8 @@ export const weekKey = (iso, ws = MONDAY) => isoOf(startOfWeek(iso, ws))export const localTZ = () => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC' } catch { return 'UTC' } }export const uid = () => Date.now().toString(36) + Math.random().toString(36).slice(2, 7)+// What each accent is called, for a screen reader (Settings' swatches carry no text).+export const ACCENT_NAMES = { lime: 'Green', sky: 'Blue', orange: 'Orange', violet: 'Purple', pink: 'Pink', red: 'Red', teal: 'Teal', gold: 'Yellow' }export const ACCENTS = { lime: '#30d158', sky: '#0a84ff', orange: '#ff9f0a', violet: '#bf5af2', pink: '#ff375f', red: '#ff453a', teal: '#40c8e0', gold: '#ffd60a' }// Text drawn on top of that swatch. Matches the --on-acc values in index.css.export const ACCENT_INK = { lime: '#000000', sky: '#ffffff', orange: '#000000', violet: '#ffffff', pink: '#ffffff', red: '#ffffff', teal: '#000000', gold: '#000000' }diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.jsindex 27a39a626..f61d4c5f1 100644--- a/frontend/src/locales/ar.js+++ b/frontend/src/locales/ar.js@@ -1686,4 +1686,24 @@ export default {'iCloud Keychain': 'سلسلة مفاتيح iCloud','Google Password Manager': 'مدير كلمات المرور من Google','your password manager': 'مدير كلمات المرور لديك',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'الأسبوع السابق',+ 'Next week': 'الأسبوع التالي',+ 'Previous month': 'الشهر السابق',+ 'Next month': 'الشهر التالي',+ 'Decrease': 'إنقاص',+ 'Increase': 'زيادة',+ 'Decrease by {0}': 'إنقاص بمقدار {0}',+ 'Increase by {0}': 'زيادة بمقدار {0}',+ 'Clear': 'مسح',+ 'QR code': 'رمز QR',+ 'Delete weigh-in': 'حذف الوزن المسجّل',+ 'Green': 'أخضر',+ 'Blue': 'أزرق',+ 'Orange': 'برتقالي',+ 'Purple': 'بنفسجي',+ 'Pink': 'وردي',+ 'Red': 'أحمر',+ 'Teal': 'أزرق مخضر',+ 'Yellow': 'أصفر',}diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.jsindex 425a6b9b5..c087cab0c 100644--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@ -1653,4 +1653,24 @@ export default {'iCloud Keychain': 'iCloud-Schlüsselbund','Google Password Manager': 'Google Passwortmanager','your password manager': 'Passwortmanager',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Vorherige Woche',+ 'Next week': 'Nächste Woche',+ 'Previous month': 'Vorheriger Monat',+ 'Next month': 'Nächster Monat',+ 'Decrease': 'Verringern',+ 'Increase': 'Erhöhen',+ 'Decrease by {0}': 'Um {0} verringern',+ 'Increase by {0}': 'Um {0} erhöhen',+ 'Clear': 'Leeren',+ 'QR code': 'QR-Code',+ 'Delete weigh-in': 'Wiegung löschen',+ 'Green': 'Grün',+ 'Blue': 'Blau',+ 'Orange': 'Orange',+ 'Purple': 'Lila',+ 'Pink': 'Pink',+ 'Red': 'Rot',+ 'Teal': 'Türkis',+ 'Yellow': 'Gelb',}diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.jsindex 7e25f1d28..7235951ed 100644--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'Llavero de iCloud','Google Password Manager': 'Gestor de contraseñas de Google','your password manager': 'tu gestor de contraseñas',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Semana anterior',+ 'Next week': 'Semana siguiente',+ 'Previous month': 'Mes anterior',+ 'Next month': 'Mes siguiente',+ 'Decrease': 'Disminuir',+ 'Increase': 'Aumentar',+ 'Decrease by {0}': 'Disminuir {0}',+ 'Increase by {0}': 'Aumentar {0}',+ 'Clear': 'Borrar',+ 'QR code': 'Código QR',+ 'Delete weigh-in': 'Eliminar pesaje',+ 'Green': 'Verde',+ 'Blue': 'Azul',+ 'Orange': 'Naranja',+ 'Purple': 'Morado',+ 'Pink': 'Rosa',+ 'Red': 'Rojo',+ 'Teal': 'Turquesa',+ 'Yellow': 'Amarillo',}diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.jsindex 71a462a0c..0156f5896 100644--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'trousseau iCloud','Google Password Manager': 'Gestionnaire de mots de passe de Google','your password manager': 'ton gestionnaire de mots de passe',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Semaine précédente',+ 'Next week': 'Semaine suivante',+ 'Previous month': 'Mois précédent',+ 'Next month': 'Mois suivant',+ 'Decrease': 'Diminuer',+ 'Increase': 'Augmenter',+ 'Decrease by {0}': 'Diminuer de {0}',+ 'Increase by {0}': 'Augmenter de {0}',+ 'Clear': 'Effacer',+ 'QR code': 'Code QR',+ 'Delete weigh-in': 'Supprimer la pesée',+ 'Green': 'Vert',+ 'Blue': 'Bleu',+ 'Orange': 'Orange',+ 'Purple': 'Violet',+ 'Pink': 'Rose',+ 'Red': 'Rouge',+ 'Teal': 'Turquoise',+ 'Yellow': 'Jaune',}diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.jsindex c2369284d..07c9f3a25 100644--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'iCloud कीचेन','Google Password Manager': 'Google पासवर्ड मैनेजर','your password manager': 'आपका पासवर्ड मैनेजर',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'पिछला सप्ताह',+ 'Next week': 'अगला सप्ताह',+ 'Previous month': 'पिछला महीना',+ 'Next month': 'अगला महीना',+ 'Decrease': 'घटाएँ',+ 'Increase': 'बढ़ाएँ',+ 'Decrease by {0}': '{0} घटाएँ',+ 'Increase by {0}': '{0} बढ़ाएँ',+ 'Clear': 'साफ़ करें',+ 'QR code': 'QR कोड',+ 'Delete weigh-in': 'वज़न प्रविष्टि हटाएँ',+ 'Green': 'हरा',+ 'Blue': 'नीला',+ 'Orange': 'नारंगी',+ 'Purple': 'बैंगनी',+ 'Pink': 'गुलाबी',+ 'Red': 'लाल',+ 'Teal': 'फ़िरोज़ी',+ 'Yellow': 'पीला',}diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.jsindex 592633101..542e1f976 100644--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@ -1636,4 +1636,24 @@ export default {'iCloud Keychain': 'iCloud-kulcskarika','Google Password Manager': 'Google Jelszókezelő','your password manager': 'jelszókezelő',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Előző hét',+ 'Next week': 'Következő hét',+ 'Previous month': 'Előző hónap',+ 'Next month': 'Következő hónap',+ 'Decrease': 'Csökkentés',+ 'Increase': 'Növelés',+ 'Decrease by {0}': 'Csökkentés ennyivel: {0}',+ 'Increase by {0}': 'Növelés ennyivel: {0}',+ 'Clear': 'Törlés',+ 'QR code': 'QR-kód',+ 'Delete weigh-in': 'Mérés törlése',+ 'Green': 'Zöld',+ 'Blue': 'Kék',+ 'Orange': 'Narancs',+ 'Purple': 'Lila',+ 'Pink': 'Rózsaszín',+ 'Red': 'Piros',+ 'Teal': 'Türkiz',+ 'Yellow': 'Sárga',}diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.jsindex ccad265f2..0ab246beb 100644--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'Portachiavi iCloud','Google Password Manager': 'Gestore delle password di Google','your password manager': 'il tuo gestore di password',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Settimana precedente',+ 'Next week': 'Settimana successiva',+ 'Previous month': 'Mese precedente',+ 'Next month': 'Mese successivo',+ 'Decrease': 'Diminuisci',+ 'Increase': 'Aumenta',+ 'Decrease by {0}': 'Diminuisci di {0}',+ 'Increase by {0}': 'Aumenta di {0}',+ 'Clear': 'Cancella',+ 'QR code': 'Codice QR',+ 'Delete weigh-in': 'Elimina pesata',+ 'Green': 'Verde',+ 'Blue': 'Blu',+ 'Orange': 'Arancione',+ 'Purple': 'Viola',+ 'Pink': 'Rosa',+ 'Red': 'Rosso',+ 'Teal': 'Turchese',+ 'Yellow': 'Giallo',}diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex 9e9c40e8e..a92d626ad 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'iCloud 키체인','Google Password Manager': 'Google 비밀번호 관리자','your password manager': '비밀번호 관리자',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': '이전 주',+ 'Next week': '다음 주',+ 'Previous month': '이전 달',+ 'Next month': '다음 달',+ 'Decrease': '줄이기',+ 'Increase': '늘리기',+ 'Decrease by {0}': '{0} 줄이기',+ 'Increase by {0}': '{0} 늘리기',+ 'Clear': '지우기',+ 'QR code': 'QR 코드',+ 'Delete weigh-in': '체중 기록 삭제',+ 'Green': '초록',+ 'Blue': '파랑',+ 'Orange': '주황',+ 'Purple': '보라',+ 'Pink': '분홍',+ 'Red': '빨강',+ 'Teal': '청록',+ 'Yellow': '노랑',}diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.jsindex cff7864fc..7af729925 100644--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'pęk kluczy iCloud','Google Password Manager': 'Menedżer haseł Google','your password manager': 'Twój menedżer haseł',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Poprzedni tydzień',+ 'Next week': 'Następny tydzień',+ 'Previous month': 'Poprzedni miesiąc',+ 'Next month': 'Następny miesiąc',+ 'Decrease': 'Zmniejsz',+ 'Increase': 'Zwiększ',+ 'Decrease by {0}': 'Zmniejsz o {0}',+ 'Increase by {0}': 'Zwiększ o {0}',+ 'Clear': 'Wyczyść',+ 'QR code': 'Kod QR',+ 'Delete weigh-in': 'Usuń pomiar wagi',+ 'Green': 'Zielony',+ 'Blue': 'Niebieski',+ 'Orange': 'Pomarańczowy',+ 'Purple': 'Fioletowy',+ 'Pink': 'Różowy',+ 'Red': 'Czerwony',+ 'Teal': 'Turkusowy',+ 'Yellow': 'Żółty',}diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.jsindex 202d29a31..c99f5ee30 100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@ -978,6 +978,26 @@ export const PT_BR_OVERRIDES = {'iCloud Keychain': 'Chaves do iCloud','Google Password Manager': 'Gerenciador de senhas do Google','your password manager': 'seu gerenciador de senhas',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Semana anterior',+ 'Next week': 'Próxima semana',+ 'Previous month': 'Mês anterior',+ 'Next month': 'Próximo mês',+ 'Decrease': 'Diminuir',+ 'Increase': 'Aumentar',+ 'Decrease by {0}': 'Diminuir {0}',+ 'Increase by {0}': 'Aumentar {0}',+ 'Clear': 'Limpar',+ 'QR code': 'QR code',+ 'Delete weigh-in': 'Excluir pesagem',+ 'Green': 'Verde',+ 'Blue': 'Azul',+ 'Orange': 'Laranja',+ 'Purple': 'Roxo',+ 'Pink': 'Rosa',+ 'Red': 'Vermelho',+ 'Teal': 'Turquesa',+ 'Yellow': 'Amarelo',}export default { ...pt, ...PT_BR_OVERRIDES }diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.jsindex b38459cd2..d671c44aa 100644--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'Porta-chaves iCloud','Google Password Manager': 'Gestor de palavras-passe da Google','your password manager': 'o teu gestor de palavras-passe',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Semana anterior',+ 'Next week': 'Semana seguinte',+ 'Previous month': 'Mês anterior',+ 'Next month': 'Mês seguinte',+ 'Decrease': 'Diminuir',+ 'Increase': 'Aumentar',+ 'Decrease by {0}': 'Diminuir {0}',+ 'Increase by {0}': 'Aumentar {0}',+ 'Clear': 'Limpar',+ 'QR code': 'Código QR',+ 'Delete weigh-in': 'Eliminar pesagem',+ 'Green': 'Verde',+ 'Blue': 'Azul',+ 'Orange': 'Laranja',+ 'Purple': 'Roxo',+ 'Pink': 'Rosa',+ 'Red': 'Vermelho',+ 'Teal': 'Turquesa',+ 'Yellow': 'Amarelo',}diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.jsindex 3200e98de..1155d1962 100644--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'связка ключей iCloud','Google Password Manager': 'Диспетчер паролей Google','your password manager': 'ваш менеджер паролей',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Предыдущая неделя',+ 'Next week': 'Следующая неделя',+ 'Previous month': 'Предыдущий месяц',+ 'Next month': 'Следующий месяц',+ 'Decrease': 'Уменьшить',+ 'Increase': 'Увеличить',+ 'Decrease by {0}': 'Уменьшить на {0}',+ 'Increase by {0}': 'Увеличить на {0}',+ 'Clear': 'Очистить',+ 'QR code': 'QR-код',+ 'Delete weigh-in': 'Удалить взвешивание',+ 'Green': 'Зелёный',+ 'Blue': 'Синий',+ 'Orange': 'Оранжевый',+ 'Purple': 'Фиолетовый',+ 'Pink': 'Розовый',+ 'Red': 'Красный',+ 'Teal': 'Бирюзовый',+ 'Yellow': 'Жёлтый',}diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.jsindex f537a1b22..59af577e3 100644--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@ -1644,4 +1644,24 @@ export default {'iCloud Keychain': 'พวงกุญแจ iCloud','Google Password Manager': 'เครื่องมือจัดการรหัสผ่านของ Google','your password manager': 'ตัวจัดการรหัสผ่านของคุณ',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'สัปดาห์ก่อนหน้า',+ 'Next week': 'สัปดาห์ถัดไป',+ 'Previous month': 'เดือนก่อนหน้า',+ 'Next month': 'เดือนถัดไป',+ 'Decrease': 'ลด',+ 'Increase': 'เพิ่ม',+ 'Decrease by {0}': 'ลด {0}',+ 'Increase by {0}': 'เพิ่ม {0}',+ 'Clear': 'ล้าง',+ 'QR code': 'คิวอาร์โค้ด',+ 'Delete weigh-in': 'ลบการชั่งน้ำหนัก',+ 'Green': 'เขียว',+ 'Blue': 'น้ำเงิน',+ 'Orange': 'ส้ม',+ 'Purple': 'ม่วง',+ 'Pink': 'ชมพู',+ 'Red': 'แดง',+ 'Teal': 'เขียวน้ำทะเล',+ 'Yellow': 'เหลือง',}diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.jsindex 16a127a8c..7839946d6 100644--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'iCloud Anahtar Zinciri','Google Password Manager': 'Google Şifre Yöneticisi','your password manager': 'şifre yöneticin',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Önceki hafta',+ 'Next week': 'Sonraki hafta',+ 'Previous month': 'Önceki ay',+ 'Next month': 'Sonraki ay',+ 'Decrease': 'Azalt',+ 'Increase': 'Artır',+ 'Decrease by {0}': '{0} azalt',+ 'Increase by {0}': '{0} artır',+ 'Clear': 'Temizle',+ 'QR code': 'QR kodu',+ 'Delete weigh-in': 'Tartıyı sil',+ 'Green': 'Yeşil',+ 'Blue': 'Mavi',+ 'Orange': 'Turuncu',+ 'Purple': 'Mor',+ 'Pink': 'Pembe',+ 'Red': 'Kırmızı',+ 'Teal': 'Turkuaz',+ 'Yellow': 'Sarı',}diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.jsindex cfe7694d0..96e568947 100644--- a/frontend/src/locales/uk.js+++ b/frontend/src/locales/uk.js@@ -1630,4 +1630,24 @@ export default {'iCloud Keychain': 'Зв’язка ключів iCloud','Google Password Manager': 'Менеджер паролів Google','your password manager': 'ваш менеджер паролів',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': 'Попередній тиждень',+ 'Next week': 'Наступний тиждень',+ 'Previous month': 'Попередній місяць',+ 'Next month': 'Наступний місяць',+ 'Decrease': 'Зменшити',+ 'Increase': 'Збільшити',+ 'Decrease by {0}': 'Зменшити на {0}',+ 'Increase by {0}': 'Збільшити на {0}',+ 'Clear': 'Очистити',+ 'QR code': 'QR-код',+ 'Delete weigh-in': 'Видалити зважування',+ 'Green': 'Зелений',+ 'Blue': 'Синій',+ 'Orange': 'Помаранчевий',+ 'Purple': 'Фіолетовий',+ 'Pink': 'Рожевий',+ 'Red': 'Червоний',+ 'Teal': 'Бірюзовий',+ 'Yellow': 'Жовтий',}diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex 30dfc40f1..26c27e07d 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -1633,4 +1633,24 @@ export default {'iCloud Keychain': 'iCloud 钥匙串','Google Password Manager': 'Google 密码管理工具','your password manager': '你的密码管理器',+ // --- screen-reader labels on icon buttons ---+ 'Previous week': '上一周',+ 'Next week': '下一周',+ 'Previous month': '上个月',+ 'Next month': '下个月',+ 'Decrease': '减少',+ 'Increase': '增加',+ 'Decrease by {0}': '减少 {0}',+ 'Increase by {0}': '增加 {0}',+ 'Clear': '清除',+ 'QR code': '二维码',+ 'Delete weigh-in': '删除称重记录',+ 'Green': '绿色',+ 'Blue': '蓝色',+ 'Orange': '橙色',+ 'Purple': '紫色',+ 'Pink': '粉色',+ 'Red': '红色',+ 'Teal': '青色',+ 'Yellow': '黄色',}diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsxindex 11ba2b6b4..265b7a4b5 100644--- a/frontend/src/sheets.jsx+++ b/frontend/src/sheets.jsx@@ -194,13 +194,13 @@ function WeightInput({ value, setValue, unit }) {return <><div className="bwstep">- <button className="bw-pm" onClick={() => onSlide(value - 0.1)} aria-label="minus 0.1"><Icon name="minus" /></button>+ <button className="bw-pm" onClick={() => onSlide(value - 0.1)} aria-label={t('Decrease by {0}', fmtNum(0.1))}><Icon name="minus" /></button><label className="bw-read"><NumberField fit value={value} onChange={onType} aria-label={t('Weight ({0})', unit)} enterKeyHint="done"onKeyDown={e => { if (e.key === 'Enter') e.currentTarget.blur() }} /><span className="u"> {unit}</span></label>- <button className="bw-pm" onClick={() => onSlide(value + 0.1)} aria-label="plus 0.1"><Icon name="plus" /></button>+ <button className="bw-pm" onClick={() => onSlide(value + 0.1)} aria-label={t('Increase by {0}', fmtNum(0.1))}><Icon name="plus" /></button></div><div className="chips" style={{ justifyContent: 'center', margin: '8px 0' }}><button className="chip" onClick={() => onSlide(value - 1)}>−1</button>@@ -281,7 +281,7 @@ function WeighInRow({ b, unit, confirm = false }) {return <div className="row between" style={{ padding: '9px 2px', borderBottom: '1px solid var(--sep)' }}><span className="small muted">{fmtDate(b.d, true)}</span><span className="row" style={{ gap: 12 }}><b>{fmtNum(b.w)} {unit}</b>- <button className="iconbtn" style={{ width: 32, height: 30, borderRadius: 8, fontSize: 15, color: 'var(--red)' }} onClick={confirm ? ask : delEntry} aria-label="delete"><Icon name="trash" /></button></span>+ <button className="iconbtn" style={{ width: 32, height: 30, borderRadius: 8, fontSize: 15, color: 'var(--red)' }} onClick={confirm ? ask : delEntry} aria-label={t('Delete weigh-in')}><Icon name="trash" /></button></span></div>}@@ -1687,10 +1687,10 @@ function EffortPicker({ kind, value, onPick, close }) {<div className="grow"><div className="tt">{t('Exact {0}', hd)}</div></div><div className="stp effcell-stp"style={curColor ? { color: curColor, background: `color-mix(in srgb, ${curColor} 20%, var(--surface-2))` } : undefined}>- <button aria-label="Decrease" onClick={() => set(stepEffort(kind, v, -1))}><Icon name="minus" /></button>+ <button aria-label={t('Decrease')} onClick={() => set(stepEffort(kind, v, -1))}><Icon name="minus" /></button><span className="val"><NumberField decimal nullable value={v ?? ''} placeholder="–"onChange={nv => set(capEffort(kind, nv))} /></span>- <button aria-label="Increase" onClick={() => set(stepEffort(kind, v, 1))}><Icon name="plus" /></button>+ <button aria-label={t('Increase')} onClick={() => set(stepEffort(kind, v, 1))}><Icon name="plus" /></button></div></div></div>@@ -2113,9 +2113,9 @@ function Calendar({ start, close }) {}return <><div className="row between" style={{ marginBottom: 2 }}>- <button className="iconbtn" onClick={() => setCur(new Date(y, mo - 1, 1))} aria-label="Previous month"><Icon name="chevronLeft" /></button>+ <button className="iconbtn" onClick={() => setCur(new Date(y, mo - 1, 1))} aria-label={t('Previous month')}><Icon name="chevronLeft" /></button><h3 style={{ margin: 0 }}>{t(MONTHS_LONG[mo])} {y}</h3>- <button className="iconbtn" onClick={() => setCur(new Date(y, mo + 1, 1))} aria-label="Next month"><Icon name="chevronRight" /></button>+ <button className="iconbtn" onClick={() => setCur(new Date(y, mo + 1, 1))} aria-label={t('Next month')}><Icon name="chevronRight" /></button></div><div className="small muted" style={{ textAlign: 'center' }}>{monthWs.length ? `${t(monthWs.length === 1 ? '{0} workout' : '{0} workouts', monthWs.length)} · ${fmtDur(monthMs)} · ${fmtVol(monthVol, st.unit)}` : t('No workouts this month')}</div><div className="cal-grid">{weekOrder(ws).map(d => <div key={d} className="cal-h">{t(DAYS[d])}</div>)}{cells}</div>diff --git a/frontend/src/sheets.weighin-history.test.jsx b/frontend/src/sheets.weighin-history.test.jsxindex 3b69d98c3..9005a45ba 100644--- a/frontend/src/sheets.weighin-history.test.jsx+++ b/frontend/src/sheets.weighin-history.test.jsx@@ -51,8 +51,8 @@ describe('weigh-ins sheet', () => {expect(weeks[0].textContent).toContain('Average 79.7 kg')expect(weeks[0].textContent).toContain('0.8') // down from 80.5 the week beforeexpect(weeks[1].textContent).toContain('Average 80.5 kg')- expect(weeks[0].querySelectorAll('button[aria-label="delete"]')).toHaveLength(3)- expect(weeks[1].querySelectorAll('button[aria-label="delete"]')).toHaveLength(2)+ expect(weeks[0].querySelectorAll('button[aria-label="Delete weigh-in"]')).toHaveLength(3)+ expect(weeks[1].querySelectorAll('button[aria-label="Delete weigh-in"]')).toHaveLength(2)})it('follows a Sunday week start', () => {@@ -66,7 +66,7 @@ describe('weigh-ins sheet', () => {it('deletes a weigh-in from the list once that is confirmed', () => {weighInsSheet()const host = mountTopSheet()- act(() => { host.querySelector('[data-week="2026-08-31"] button[aria-label="delete"]').click() })+ act(() => { host.querySelector('[data-week="2026-08-31"] button[aria-label="Delete weigh-in"]').click() })expect(useStore.getState().S.bodyweight).toHaveLength(5)expect(useUI.getState().sheets).toHaveLength(2)const ask = mountTopSheet()@@ -80,7 +80,7 @@ describe('weigh-ins sheet', () => {it('keeps the weigh-in when the question is cancelled', () => {weighInsSheet()const host = mountTopSheet()- act(() => { host.querySelector('[data-week="2026-08-31"] button[aria-label="delete"]').click() })+ act(() => { host.querySelector('[data-week="2026-08-31"] button[aria-label="Delete weigh-in"]').click() })const ask = mountTopSheet()act(() => { button(ask, 'Cancel').click() })expect(useUI.getState().sheets).toHaveLength(1)@@ -91,7 +91,7 @@ describe('weigh-ins sheet', () => {it('still deletes one of the log sheet\'s recent weigh-ins in one tap', () => {bwSheet()const log = mountTopSheet()- act(() => { log.querySelector('button[aria-label="delete"]').click() })+ act(() => { log.querySelector('button[aria-label="Delete weigh-in"]').click() })expect(useUI.getState().sheets).toHaveLength(1)expect(useStore.getState().S.bodyweight).toHaveLength(4)})@@ -107,7 +107,7 @@ describe('weigh-ins sheet', () => {it('is reached from the log sheet once there are more weigh-ins than its recent three', () => {bwSheet()const log = mountTopSheet()- expect(log.querySelectorAll('button[aria-label="delete"]')).toHaveLength(3)+ expect(log.querySelectorAll('button[aria-label="Delete weigh-in"]')).toHaveLength(3)const all = button(log, 'All weigh-ins')expect(all).toBeTruthy()act(() => { all.click() })diff --git a/frontend/src/sheets.weight-input.test.jsx b/frontend/src/sheets.weight-input.test.jsxindex 4ced7c627..49a50e027 100644--- a/frontend/src/sheets.weight-input.test.jsx+++ b/frontend/src/sheets.weight-input.test.jsx@@ -70,7 +70,7 @@ describe('weight read-out is a typable field', () => {it('steps on from the typed value and saves what ends up on screen', () => {const { input, button } = renderBw()act(() => type(input, '82.5'))- act(() => button('plus 0.1').click())+ act(() => button('Increase by 0.1').click())expect(input.value).toBe('82.6')act(() => button('Save').click())diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsxindex 2db5cb88e..2e16b77fd 100644--- a/frontend/src/views/Home.jsx+++ b/frontend/src/views/Home.jsx@@ -71,9 +71,9 @@ export default function Home() {<div className="card"><div className="row between" style={{ marginBottom: 8 }}>- <button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w - 1)} aria-label="Previous week"><Icon name="chevronLeft" /></button>+ <button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w - 1)} aria-label={t('Previous week')}><Icon name="chevronLeft" /></button><div className="small muted" style={{ fontWeight: 500 }}>{wkLabel}</div>- <button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w + 1)} aria-label="Next week"><Icon name="chevronRight" /></button>+ <button className="iconbtn" style={{ width: 30, height: 30, fontSize: 15 }} onClick={() => setWeekOffset(w => w + 1)} aria-label={t('Next week')}><Icon name="chevronRight" /></button></div><div className="week">{strip}</div>{/* Once today's session is logged the row stops asking for it. The week strip alreadydiff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsxindex b83fe942e..899433148 100644--- a/frontend/src/views/Settings.jsx+++ b/frontend/src/views/Settings.jsx@@ -6,7 +6,7 @@ import { convertStateUnit } from '../lib/units.js'import { speedUnitOf } from '../lib/speed.js'import { copyText } from '../lib/clipboard.js'import { useUI } from '../store/useUI.js'-import { ACCENTS, todayISO, localTZ, weekStartOf, MONDAY, SUNDAY, fmtPlate } from '../lib/format.js'+import { ACCENTS, ACCENT_NAMES, todayISO, localTZ, weekStartOf, MONDAY, SUNDAY, fmtPlate } from '../lib/format.js'import { inventoryFor, ownsPlates } from '../lib/plates.js'import { effortOf } from '../lib/history.js'import { unlock, playOnSilentSupported, vibrateSupported } from '../lib/sound.js'@@ -516,7 +516,7 @@ export default function Settings() {<div className="swatches">{Object.entries(ACCENTS).map(([k, c]) => (<button key={k} className={'swatch' + ((S.accent || 'lime') === k ? ' on' : '')}- style={{ background: c }} onClick={() => { update(s => { s.accent = k }); setRestAccent(k) }} aria-label={k} />+ style={{ background: c }} onClick={() => { update(s => { s.accent = k }); setRestAccent(k) }} aria-label={t(ACCENT_NAMES[k] || k)} />))}</div></div>diff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsxindex 56f8fc8a0..39340a4ed 100644--- a/frontend/src/views/Workout.jsx+++ b/frontend/src/views/Workout.jsx@@ -277,10 +277,10 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSiconst wc = workoutControls(S)const cell = (s, i, col, cls) => (<div className={'stp ' + cls + (wc.steppers ? '' : ' plain')}>- {wc.steppers && <button aria-label="Decrease" onClick={() => bump(s, i, col, -1)}><Icon name="minus" /></button>}+ {wc.steppers && <button aria-label={t('Decrease')} onClick={() => bump(s, i, col, -1)}><Icon name="minus" /></button>}<span className="val"><NumberField decimal={col.dec} nullable={col.opt} value={viewOf(col, s[col.f]) ?? ''}onChange={v => onField(i, col.f, col.store ? col.store(v) : v)} /></span>- {wc.steppers && <button aria-label="Increase" onClick={() => bump(s, i, col, 1)}><Icon name="plus" /></button>}+ {wc.steppers && <button aria-label={t('Increase')} onClick={() => bump(s, i, col, 1)}><Icon name="plus" /></button>}</div>)// Plate loading, per set row (lib/plates.js): which plates make THIS row's weight, from the@@ -403,9 +403,9 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSireturn (<div className={'stp effcell-stp' + (wc.steppers ? '' : ' plain')}style={color ? { color, borderColor: color, background: `color-mix(in srgb, ${color} 20%, var(--surface-2))` } : undefined}>- {wc.steppers && <button aria-label="Decrease" onClick={() => step(-1)}><Icon name="minus" /></button>}+ {wc.steppers && <button aria-label={t('Decrease')} onClick={() => step(-1)}><Icon name="minus" /></button>}<button className="val" aria-label={col.hd} onClick={open}>{fmtNum(v)}</button>- {wc.steppers && <button aria-label="Increase" onClick={() => step(1)}><Icon name="plus" /></button>}+ {wc.steppers && <button aria-label={t('Increase')} onClick={() => step(1)}><Icon name="plus" /></button>}</div>)}@@ -424,10 +424,10 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSi}const sideCell = (sd, i, side, col, cls) => (<div className={'stp ' + cls + (wc.steppers ? '' : ' plain')}>- {wc.steppers && <button aria-label="Decrease" onClick={() => sideBump(i, side, col, -1)}><Icon name="minus" /></button>}+ {wc.steppers && <button aria-label={t('Decrease')} onClick={() => sideBump(i, side, col, -1)}><Icon name="minus" /></button>}<span className="val"><NumberField decimal={col.dec} value={sd[col.f] ?? ''}onChange={v => setSide(i, side, col.f, v)} /></span>- {wc.steppers && <button aria-label="Increase" onClick={() => sideBump(i, side, col, 1)}><Icon name="plus" /></button>}+ {wc.steppers && <button aria-label={t('Increase')} onClick={() => sideBump(i, side, col, 1)}><Icon name="plus" /></button>}</div>)const sideEffortCell = (sd, i, side, col) => {@@ -444,9 +444,9 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSireturn (<div className={'stp effcell-stp' + (wc.steppers ? '' : ' plain')}style={color ? { color, borderColor: color, background: `color-mix(in srgb, ${color} 20%, var(--surface-2))` } : undefined}>- {wc.steppers && <button aria-label="Decrease" onClick={() => step(-1)}><Icon name="minus" /></button>}+ {wc.steppers && <button aria-label={t('Decrease')} onClick={() => step(-1)}><Icon name="minus" /></button>}<button className="val" aria-label={col.hd} onClick={open}>{fmtNum(v)}</button>- {wc.steppers && <button aria-label="Increase" onClick={() => step(1)}><Icon name="plus" /></button>}+ {wc.steppers && <button aria-label={t('Increase')} onClick={() => step(1)}><Icon name="plus" /></button>}</div>)}@@ -490,9 +490,9 @@ function ExerciseBlock({ entryIdx, compact, dense, editing, onToggle, onToggleSi// live "+ Drop"/"+ Burst" tap) already put on the row, not typing into a fresh field.const miniStepper = (value, step, dec, onChange, snapWeightStep = false) => (<div className="stp mini">- <button aria-label="Decrease" onClick={() => onChange(snapWeightStep ? stepWeight(value, step, -1) : Math.max(0, Math.round(((value || 0) - step) * 100) / 100))}><Icon name="minus" /></button>+ <button aria-label={t('Decrease')} onClick={() => onChange(snapWeightStep ? stepWeight(value, step, -1) : Math.max(0, Math.round(((value || 0) - step) * 100) / 100))}><Icon name="minus" /></button><span className="val"><NumberField decimal={dec} value={value ?? ''} onChange={onChange} /></span>- <button aria-label="Increase" onClick={() => onChange(snapWeightStep ? stepWeight(value, step, 1) : Math.max(0, Math.round(((value || 0) + step) * 100) / 100))}><Icon name="plus" /></button>+ <button aria-label={t('Increase')} onClick={() => onChange(snapWeightStep ? stepWeight(value, step, 1) : Math.max(0, Math.round(((value || 0) + step) * 100) / 100))}><Icon name="plus" /></button></div>)return <>