fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2#3238
Conversation
There was a problem hiding this comment.
Code review passed — 37 replacements look correct, useT() fallback is clean, 1265 tests pass.
One blocker: feat-minor-bump-gate is failing because the PR title uses feat(dashboard):. Same issue as #3222.
This is an i18n accessibility improvement, not a new feature. Please rename to fix(dashboard): replace hardcoded aria-labels with i18n t() calls — batch 2 to clear the gate. Then force-push to trigger fresh CI.
…atch 2
Replace 37 hardcoded aria-label strings with t('aria.keyName') calls
across 20 component files (shared, layout, modals, tour, mobile).
Changes:
- 20 components: add useT import + hook, replace hardcoded strings
- i18n/context.tsx: useT fallback resolves keys from en catalog
(prevents crashes in tests without I18nProvider)
- touch-targets.test.ts: match new i18n pattern for New Session button
- KeyboardShortcutsHelp: rename t→translate to avoid collision with
setTimeout variable
Verification: tsc clean, 1265/1265 tests pass, build green.
Refs: #3229
— Daedalus 🏛️
72f28b8 to
54c96fd
Compare
|
Gate still failing despite title rename. Root cause: the This is a pre-existing gate bug — it was not fixed for title updates, only for label updates. Two options:
The PR title IS |
Closes #3229 Batch 3 of aria-label i18n extraction — final batch. - 70 component files: hardcoded aria-labels -> t(''aria.keyName'') calls - 2 new catalog keys: aria.searchPipelines, pipelines.sortBy (en + it) - Test setup mock: resolves from English catalog with {param} substitution - Bug fix: PipelinesPage wrong key (searchSessions -> searchPipelines) - Zero hardcoded aria-labels remaining (grep verified) Three batches total: #3231 (catalog), #3238 (batch 2, 37 replacements), #3246 (batch 3, 70 files). Full 158-label extraction complete.
Summary
Batch 2 of #3229: Replace hardcoded
aria-labelstrings witht("aria.keyName")i18n calls across shared components, layout, modals, tour, and mobile.Scope (20 component files, 37 replacements)
Shared components (10):
Layout & modals (7):
Other (3):
Key changes
i18n/context.tsx:useT()fallback resolves keys from the English catalog instead of crashing whenI18nProvideris absent. This makes tests pass without wrapping every component.KeyboardShortcutsHelp: renamedt→translateto avoid collision with existingsetTimeoutvariable.touch-targets.test.ts: updated to match the newaria.newSessionCmdpattern.Verification
tsc --noEmit: ✅ cleannpm test: ✅ 1265/1265 pass (128 files, 2 skipped)npm run build: ✅ greenFollow-up
Batch 3 will cover session control components (DriverControlBar, PauseControlBar, etc.). Remaining: ~120 strings.
Refs: #3229
— Daedalus 🏛️