Skip to content

a11y: VfoWidget + LevelBar custom-painted widgets need QAccessibleInterface #3754

Description

@ten9876

Summary

The Qt Accessibility Static Analysis check on #3751 surfaced 2 warnings for custom-painted widgets in VfoWidget that lack a QAccessibleInterface, so screen readers can't read their custom-drawn content:

Location Widget Finding
src/gui/VfoWidget.h:182 VfoWidget overrides paintEvent + exposes data setters, no QAccessibleInterface
src/gui/VfoWidget.cpp:71 LevelBar (S-meter bar) overrides paintEvent + exposes data setters, no QAccessibleInterface

These are pre-existing — both predate #3751, which only added a bool m_signalHasDbm flag (the H1 KiwiSDR no-data fix from #3750) and touched no paint code. Editing VfoWidget.{cpp,h} is what brought the files into the linter's scope. The check is warnings-only and did not block the merge (#3751 is already on main at 87e1adca); filing this so the gap is tracked rather than lost.

Why it matters

VfoWidget (the VFO flag) and LevelBar render frequency, meter, and signal-level information by custom painting. A screen reader currently sees them as opaque widgets. VfoWidget already exposes some state via setAccessibleName on m_dbmLabel + QAccessibleValueChangeEvent, but the custom-drawn meter/frequency content itself has no accessible value, and LevelBar exposes nothing.

Proposed work

Implement QAccessibleInterface subclasses (or companion *Accessible.h) for:

  • LevelBartext(Name) = "Signal level", text(Value) = the current S-unit / dBm reading; ideally the QAccessible::Value role so the level reads as a value.
  • VfoWidget — expose the frequency readout and active meter reading as accessible name/value; coordinate with the existing m_dbmLabel accessibility so they don't double-announce.

Per docs/a11y.md for the canonical Qt patterns (setAccessibleName, QAccessibleValueChangeEvent, QAccessibleInterface subclasses).

Context / refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuregood first issueGood for newcomersmaintainer-reviewRequires maintainer review before any action is takenpriority: lowLow priority

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions