Skip to content

Expose value-picking sliders as a slider and a radio group - #31191

Open
rezabakhshilaktasaraei wants to merge 4 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:discrete-slider-value-roles
Open

Expose value-picking sliders as a slider and a radio group#31191
rezabakhshilaktasaraei wants to merge 4 commits into
telegramdesktop:devfrom
rezabakhshilaktasaraei:discrete-slider-value-roles

Conversation

@rezabakhshilaktasaraei

Copy link
Copy Markdown
Contributor

Two of the DiscreteSlider strips do not switch displayed content - they pick a value - so with #31097 in place they can get their real roles:

  • The notifications count (Settings > Notifications and Sounds) picks a number of 1..5. It is now a single slider element: the arrows change the value right away and a screen reader reads and follows the number, the same way the volume slider works.
  • The proxy auto-switch timeout picks one of a few textual durations. It is now read as a radio group: Left / Right check the option the arrows land on, matching how the Radiobutton groups behave (a horizontal group leaves Up / Down free).

All other strips keep the tab roles from #31097.

Depends on #31097 and on desktop-app/lib_ui#354 (the accessible value interface), so it compiles only on top of them.

The sections of Ui::DiscreteSlider are painted, so screen readers had
nothing to focus or read. In screen reader mode the slider becomes a
Tab stop reporting a tab control with a virtual tab per section: Tab
lands on the active tab, the arrows and Home/End switch to the tab
they land on right away, like the native Windows tab controls, and
the platform announces the switch through the focus move. The
selection interface carries the selected state, and subclasses can
follow the browse position through a producer and an accessor.
Without a screen reader nothing changes - the widget is not focusable
then.
The notifications count strip picks a number, not a displayed section,
so a screen reader hears it as a single slider element now: the arrows
change the value right away and the value is reported both numerically
for the range pattern and as text, which is what a screen reader reads
and announces.
@rezabakhshilaktasaraei
rezabakhshilaktasaraei force-pushed the discrete-slider-value-roles branch from 1a560b5 to 9d27388 Compare August 28, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant