Skip to content

kcms/keys: add Accessible.names to buttons that rely on context & other minor wording / a11y changes

Christoph Wolk requested to merge cwo/plasma-desktop:keys_a11y_strings into master

The HIG recommend that for short button labels that do not contain an object (e.g. "Add") the Accessible name should contain an expanded text (e.g. "Add command"), as the visual clues cannot be relied upon.

This MR goes through the whole kcm_keys, adding Accessible.names where the regular label seems unclear.

In the case of Actions, the Accessible.name currently cannot be set, due to a limitation in Qt. This is fixed in Qt 6.8; in preparation for this the Accessible.names are already set, but commented out and marked with a TODO that indicates they should be enabled once Qt 6.8 are required. These should, however, be tested separately then to see if they work.

There is also a small number of minor fixes and changes included:

  • The exporting terminology now consistently uses the verb "export", instead of "save" for the final button (Screenshots attached)
  • tooltip translation context markers are set and use the official markers recommended in the ki18n Programmer's guide
  • A typo in a translation context is fixed
  • The command field in the Edit command button is selected when opening that dialog, to facilitate easier editing and to make sure screen readers read out the content of the text field.

Unfortunately, even with these changes, a11y of this kcm is still in a rather bad state; several controls apparently cannot be reached with the keyboard at all, and even the ones that can are very hard to figure out if you cannot see the screen; for example, to add a custom shortcut, the user needs to press tab until the "Add New" button is reached, then press down (with no audible indication that this button is attached to a listview, the user has to guess) until the correct category is selected and press right (tab will not work for either), then down again until the desired function is reached, press space (return does not work, and there is no indication that space has expanded the shortcut settings for this action), then press tab (arrow keys will not work) to start the tab focus chain over from the top of the window, only this time with the checkbox and add shortcut buttons included. It's possible to do, but requires a lot of random guessing to figure out. I'm not quite sure what the best practice for setting this is, and in any case this is probably best fixed as a separate MR.

Screenshots of visual and functionality changes:

Current: kcm_keys_export_save

New:

kcm_keys_export_export

New (Current omitted; is the same with the text not selected): kcm_keys_edit_command

@teams/vdg @teams/accessibility

Edited by Christoph Wolk

Merge request reports

Loading