GNOME Bugzilla – Bug 707926
GtkSwitch shouldn't have a default accessible description
Last modified: 2013-09-12 09:55:08 UTC
+++ This bug was initially created as a clone of Bug #707872 +++ > Right now GtkSwitch has a default name ("light switch widget" or "Switch"). > Usually switchs are labelled, so if a switch is focused, it is properly named. > ATs use to expose name and the content of the label associated with the widget. > Having the default name is useless, and usually not user-friendly. Turns out it has a generic description too: atk_object_set_description (accessible, _("Switches between on and off states")); And now Orca is presenting it each and every time a user gives focus to a switch. This is a side effect of removing the generic name: If a widget lacks a name, but the developer has taken the time to expose an accessible description, Orca's theory is that this description is important information, specific to that widget instance, that the user wants to hear. (Orca cain't get 'em all right.... ;) ) Please remove this description. Thanks!!
Created attachment 254721 [details] [review] Remove the default description from GtkSwitch In the end it is a little more that just remove one line. The reason is that after remove that line, ->initialize was just setting the role, something that is not needed as gtk has the method gtk_widget_class_set_accessible_role, and this specific class will have always the same role. So the patch removes the redefinition of atkobject->initialize and set the role at gtkswitch, just after setting the accessible_type.
Review of attachment 254721 [details] [review]: sure. less code is good !