Skip to content

bug(i18n): household item detail Add-budget-line button exposes raw i18n key as aria-label #1857

Description

@steilerDev

Bug

PR #1844 changed the BudgetSection add-line button's aria-label from the hardcoded string "Add budget line" to t('budgetLineForm.addBudgetLineAriaLabel'). In BudgetSection.tsx the t function is namespace-switched: useTranslation(budgetLineType === 'household_item' ? 'householdItems' : 'budget'). The key budgetLineForm.addBudgetLineAriaLabel only exists in the budget namespace (en + de), so on household item detail pages the accessible name is the literal key string budgetLineForm.addBudgetLineAriaLabel.

Impact

  • Accessibility regression: screen readers announce a raw i18n key on household item pages (all locales).
  • Deterministic E2E failures on beta (ad-hoc run 28934922175): shards 3, 4, 10, 14 —
    • household-item-detail.spec.ts:141 "Add Budget Line" button visible (desktop/tablet/mobile)
    • budget/unit-pricing.spec.ts:211 HI unit pricing with VAT (desktop)

Fix

Resolve the aria-label via the always-budget-namespaced tBudget already present in the component: aria-label={tBudget('budgetLineForm.addBudgetLineAriaLabel')}.

[orchestrator] Filed during /fix-e2e cycle.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions