Hy Everybody,
In GNOME Control Center application lot of preference tool dialogs
unfortunately GNOME Developers not associated the labels with real
widgets with mnemonic_widget property, or not associated the
accessibility property for widgets need labels.
The typical easy resolvable dialog part is the Power management
preference tool dialog.
I maked a little patch for the Ubuntu Oneiric compatible package
version, but before I opening a bugreport and attaching a final patch
for Launchpad or upstream level, an A11y developer please review I doed
changes and write hints for proper acceptable fix related with future.
This type fixes will be possible awailable for Oneiric-updates later, or
only possible land for Precise?
I attaching the patch, and the already modified UI file. If anybody
want, easy testing the difference with Orca Screen Reader with following
way:
1. Launch GNOME Control Center, and activate the power management
related preference dialog.
2. Look what happening if you tabbing the dialog widgets. You not will
be hear some label texts.
3. Close Power management preference tool, and if you want, put the
modifyed power.ui file with the /usr/share/gnome-control-center/ui
directory in your Oneiric system. Of course, before you doing this, do a
backup copy the original file.
4. Repeat the prewious test. Hopefuly, you will be hear all missing
important labels.
Now I have possibility to test Power management preference tool only
when the AC adapter are connected my laptop, if have more missing
labels this preference tool, please write the label text me or this list.
I not used now the mnemonic_widget property, because not remember when I
working the fix possible associate more widgets this property with one
equals label (I think the object name is label7).
Very interesting, when I looked upstream version to make perhaps
upstream level compatible patch with future, the lid close related label
is missing the upstream UI file, or I not founded only this label. :-):-)
I welcome working future this type fixes if I have enough free time for
Precise development, but need determining what the best place this
fixes: Ubuntu level or upstream level?
I ask this, because for example GNOME Control Center related perhaps
some UI files is different with two level if I see right.
Attila
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.20"/>
<object class="GtkListStore" id="liststore_critical">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
<!-- column-name sensitive -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Hibernate</col>
<col id="1">3</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Shutdown</col>
<col id="1">2</col>
<col id="2">True</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_power">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
<!-- column-name sensitive -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Suspend</col>
<col id="1">1</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Hibernate</col>
<col id="1">3</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Do nothing</col>
<col id="1">5</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Ask me</col>
<col id="1">4</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Shutdown</col>
<col id="1">2</col>
<col id="2">True</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_sleep">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
<!-- column-name sensitive -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Suspend</col>
<col id="1">1</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Hibernate</col>
<col id="1">3</col>
<col id="2">True</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_time">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">5 minutes</col>
<col id="1">300</col>
</row>
<row>
<col id="0" translatable="yes">10 minutes</col>
<col id="1">600</col>
</row>
<row>
<col id="0" translatable="yes">30 minutes</col>
<col id="1">1800</col>
</row>
<row>
<col id="0" translatable="yes">1 hour</col>
<col id="1">3600</col>
</row>
<row>
<col id="0" translatable="yes">Don't suspend</col>
<col id="1">0</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore_lid">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
<!-- column-name sensitive -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Suspend</col>
<col id="1">1</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Hibernate</col>
<col id="1">3</col>
<col id="2">True</col>
</row>
<row>
<col id="0" translatable="yes">Do nothing</col>
<col id="1">5</col>
<col id="2">True</col>
</row>
</data>
</object>
<object class="GtkWindow" id="window_power">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<child>
<object class="GtkVBox" id="vbox_power">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">9</property>
<child>
<object class="GtkBox" id="box_header">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
<child>
<object class="GtkLabel" id="label_header_padding">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_header_battery">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">On battery power</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_header_ac">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">When plugged in</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Suspend when inactive for:</property>
<accessibility>
<relation type="label-for" target="combobox_sleep_battery"/>
<relation type="label-for" target="combobox_sleep_ac"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="combobox_sleep_battery">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore_time</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="combobox_sleep_ac">
<property name="width_request">150</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore_time</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
<child>
<object class="GtkLabel" id="label_lid_action">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">When the lid is closed:</property>
<accessibility>
<relation type="label-for" target="combobox_lid_battery"/>
<relation type="label-for" target="combobox_lid_ac"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_lid_battery">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore_lid</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_lid_ac">
<property name="width_request">150</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore_lid</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">9</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">When power is _critically low:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">combobox_critical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_critical">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore_critical</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox_status">
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="image_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-dialog-authentication</property>
<property name="icon-size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Battery charging</property>
<attributes>
<attribute name="scale" value="1.5"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_description">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">55 minutes until fully charged (6%)</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkSizeGroup" id="sizegroup_combos">
<widgets>
<widget name="combobox_critical"/>
<widget name="combobox_sleep_battery"/>
<widget name="combobox_sleep_ac"/>
<widget name="combobox_lid_battery"/>
<widget name="combobox_lid_ac"/>
<widget name="label_header_battery"/>
<widget name="label_header_ac"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup_labels">
<property name="ignore_hidden">True</property>
<widgets>
<widget name="label5"/>
<widget name="label_lid_action"/>
<widget name="label7"/>
<widget name="label_header_padding"/>
</widgets>
</object>
</interface>
--- panels/power/power.ui.old 2011-10-21 14:09:13.545745896 +0200
+++ panels/power/power.ui 2011-10-21 15:24:02.677968091 +0200
@@ -212,6 +212,10 @@
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Suspend when inactive for:</property>
+ <accessibility>
+ <relation type="label-for" target="combobox_sleep_battery"/>
+ <relation type="label-for" target="combobox_sleep_ac"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
@@ -262,6 +266,10 @@
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">When the lid is closed:</property>
+ <accessibility>
+ <relation type="label-for" target="combobox_lid_battery"/>
+ <relation type="label-for" target="combobox_lid_ac"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
--
Ubuntu-accessibility mailing list
Ubuntu-accessibility@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-accessibility