Skip to content

MiniBarChart empty state: add aria-label and localize the placeholder text #82

Description

@tsouth89

Context

The empty state in apps/desktop-tauri/src/components/MiniBarChart.tsx:28 renders a bare <span>No data</span>. Two small issues:

  1. A11y — the chart container has no role="img" / aria-label, so the empty state is not described to assistive tech.
  2. i18n"No data" is hardcoded English while the rest of the app localizes via useLocale() / t(...).

Task

  • Give the empty-state container a role="img" and an aria-label describing what is empty (include label when present).
  • Replace the hardcoded "No data" with a localized string via the existing locale system.

Acceptance criteria

  • Adds a new locale key (follow the existing key pattern; this repo is English-only, so only en-US.ftl plus the key registry need updating — see pointers).
  • The empty state exposes an accessible name.
  • No visual regression for the populated chart path.

How to test

pnpm --dir apps/desktop-tauri test
pnpm --dir apps/desktop-tauri run build

Pointers

  • Component: MiniBarChart.tsx:24
  • Locale strings live in rust/src/locale/en-US.ftl and the frontend key registry under apps/desktop-tauri/src/i18n/. Grep an existing key (one already used with t(...)) to see every place a new key must be added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomersjavascriptPull requests that update javascript code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions