Sunday, June 30, 2013

Implementing Accessibility

Last night I decided to look closely at the issue Linus crapped on me for.  ;)  He's wrong. There's nothing wrong with the design of the feature. The problem is that he's using a desktop distro that doesn't implement it properly, and has bugs.

The specification is captured nicely at the Accessibility Site of the Linux Foundation. That document has a detailed list of functional tests to perform that can verify if the accessibility design has been correctly executed. There's also good documentation here and here at the gnome.org site, describing the accessibility features that are built in to gdm.

The various accessibility keys are handled by gdm/gdm3. When the mode is about to switch, gdm generates a notification that is sent up to the desktop manager. The design of the feature states that the desktop manager is supposed to show a suitable notification that the mode switch is going to happen, and allow the user to opt-out or alter the setting more permanently. The desktop manager is also supposed to display, in some suitable manner, an indicator that a special keyboard mode has been activated (and allow interaction with that indicator to turn the special mode off).

XFCE doesn't the the notification daemon that's supposed to be handling these events, so it ignores the notifications issued by gdm. Because gdm receives nothing back, it goes ahead and changes the mode.

I'm not sure about other distributions, but I have heard that Linus runs XFCE. If so, that distro is bugged -- it ignores the valid notifications that gdm is issuing, which leads to the "silent" mode change to SlowKeys.

Redhat Bugzilla report Slow keys turned itself on (keyboard "died") shows what happens when able-bodied developers are assigned to work on unfamiliar accessibility tasks. Almost all commentors do not realize the the "Slow Keys" checkbox in the settings dialog is ONE toggle for SlowKeys; the "hold shift for 8-10 seconds" is ANOTHER toggle. So clearing that checkbox has nothing to do with disabling the SlowKeys keyboard toggle; it merely changes the current state. Disabling the toggle entirely is a completely different setting.

Comments such as this show developers presuming that the correctly functioning accessibility code is actually a "reproducible bug".

Sadly, the XFCE maintainers recently pushed a changeset that makes any XFCE-based distro inaccessible by default to physically challenged users who need to the keyboard to be in a specific mode before they can do *anything* with the computer. If the accessibility standard modes are off by default and the toggles are not available, these users cannot navigate to the settings dialog to change it

Saying that disabled users should "go find a someone to help them" is a poor response.

In short, the pain here is caused by desktop managers that ignore or do not receive the notifications from gdm, and by developers who misunderstand the meaning of the settings checkboxes they see. 

It might make sense to file a bug against the SlowKeys checkbox UI in XFCE, as its label does not clearly reflect what it is. 

If a particular distribution or desktop manager doesn't show the notifications, it's not a bug in gdm, and the feature itself is not flawed.

Here's what Ubuntu does: Holding down the shift key for 8 seconds on Ubuntu triggers this notification if keyboard adjustment of accessibility settings is allowed:
Looks like adequate notification to me! When Universal Access is turned on, Ubuntu displays an icon on the task bar showing that it's active. You can call up preferences from that Universal Access icon. Changes to the settings are correctly reflected in Ubuntu's Universal Access settings dialog, dynamically: