Skip to content

applet: improve keyboard navigation and accessibility

Christoph Wolk requested to merge cwo/plasma-pa:keyboard_a11y into master

The volume applet has some minor keyboard and accessibility issues or visual inconsistencies, including:

  • keyboard navigation uses the highlighted (pressed) look for the focused delegate, rather than the more common Plasma highlight effect
  • pressing space on the delegate does nothing. Instead, we activate the device or mute the stream
  • keyboard focus on the device radio buttons as well as the slider is now unnecessary as these work directly from the delegate, disable to simplify keyboard use (similar to delegates in other places like Discover and KDE Connect)
  • The two list segments are not properly announced over screen readers
  • In the standalone widget, the header buttons are on the same row as the tab bar, but cannot be reached using arrow keys
  • The volume-slider reads out unfriendly 16-bit values as provided by PulseAudio. Instead ignore (it's no longer directly interacted with using the keyboard) and read out the percent label value
  • Arrow keys on the slider didn't actually follow the volume change step preference, but instead always went in 1% steps. This is particularly awkward with screen readers as the values get read out.

This change fixes these and probably some other minor issues.


focus indicator includes a visual change:

before after
volume_focus_before volume_focus_after

I'm slightly unhappy with having Space do different things on devices and applications (toggle default vs. toggle mute), but they're visually different (big icon vs. radio button) and the menu contents are different.

Tab navigation is still very wonky here (though in a slightly different way from before), but on a widget this complex (multiple lists with buttons inside the delegates, stackview, header and footer, differences between standalone and tray version) we really need to explicitly specify everything explicitly there, qml's automatic focus gives bad results and trying to surgically nudge it in the right direction breaks even more things. I have some work on this ongoing, but it's tricky to get right.

@teams/accessibility @teams/usability @teams/vdg

Merge request reports

Loading