After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707926 - GtkSwitch shouldn't have a default accessible description
GtkSwitch shouldn't have a default accessible description
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Accessibility
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-09-11 16:27 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2013-09-12 09:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove the default description from GtkSwitch (1.78 KB, patch)
2013-09-11 16:40 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2013-09-11 16:27:17 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!!
Comment 1 Alejandro Piñeiro Iglesias (IRC: infapi00) 2013-09-11 16:40:07 UTC
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.
Comment 2 Matthias Clasen 2013-09-11 18:31:28 UTC
Review of attachment 254721 [details] [review]:

sure. less code is good !