Skip to content

Add progressbar ARIA semantics to the tray usage meter #76

Description

@tsouth89

Context

The usage meter in apps/desktop-tauri/src/surfaces/tray/UsageBar.tsx:26 is a visual progress bar (usage-bar__track / usage-bar__fill) with a percentage next to it, but it exposes no ARIA semantics. Screen readers can't announce it as a meter.

Task

Add role="progressbar" with aria-valuenow, aria-valuemin={0}, aria-valuemax={100}, and an aria-label (include the label prop when present) to the track element.

Acceptance criteria

  • The track div reports role="progressbar" and the current clamped percentage via aria-valuenow.
  • aria-label is meaningful (e.g. "{label} usage: 72%"), falling back gracefully when label is undefined.
  • A short test in a new UsageBar.test.tsx asserts the role and aria-valuenow for a sample window.
  • No visual change.

How to test

pnpm --dir apps/desktop-tauri test

Pointers

  • Component: UsageBar.tsx. Note pct is already clamped to 0–100; rawPct is the unclamped percent for the label.

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