Fix some accessibility issues in demos

Fixes #110
This commit is contained in:
Samuel Thibault 2018-03-19 16:29:25 +01:00
parent 1a1373779f
commit 9561b97dc4
5 changed files with 95 additions and 9 deletions

View File

@ -45,6 +45,9 @@
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<accessibility>
<relation type="label-for" target="treeview1"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -81,6 +84,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label1"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -129,6 +135,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label2"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -142,6 +151,9 @@
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<accessibility>
<relation type="label-for" target="treeview2"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -155,6 +167,9 @@
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<accessibility>
<relation type="label-for" target="treeview3"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -185,6 +200,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>

View File

@ -27,9 +27,12 @@
<property name="column-spacing">10</property>
<property name="margin">20</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="label_plain">
<property name="label">Plain</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_plain"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -37,12 +40,15 @@
</packing>
</child>
<child>
<object class="GtkScale">
<object class="GtkScale" id="scale_plain">
<property name="can-focus">1</property>
<property name="width-request">200</property>
<property name="draw-value">0</property>
<property name="adjustment">adjustment1</property>
<property name="hexpand">1</property>
<accessibility>
<relation type="labelled-by" target="label_plain"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -50,9 +56,12 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="label_marks">
<property name="label">Marks</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_marks"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -60,7 +69,7 @@
</packing>
</child>
<child>
<object class="GtkScale">
<object class="GtkScale" id="scale_marks">
<property name="can-focus">1</property>
<property name="width-request">200</property>
<property name="draw-value">0</property>
@ -73,6 +82,9 @@
<mark value="3" position="bottom"></mark>
<mark value="4" position="bottom"></mark>
</marks>
<accessibility>
<relation type="labelled-by" target="label_marks"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -80,9 +92,12 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="label_discrete">
<property name="label">Discrete</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_discrete"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -90,13 +105,16 @@
</packing>
</child>
<child>
<object class="GtkScale">
<object class="GtkScale" id="scale_discrete">
<property name="can-focus">1</property>
<property name="width-request">200</property>
<property name="round-digits">0</property>
<property name="draw-value">0</property>
<property name="adjustment">adjustment3</property>
<property name="hexpand">1</property>
<accessibility>
<relation type="labelled-by" target="label_discrete"/>
</accessibility>
<marks>
<mark value="0" position="bottom"></mark>
<mark value="1" position="bottom"></mark>

View File

@ -104,6 +104,7 @@
<child>
<object class="GtkSwitch" id="switch1">
<property name="can-focus">1</property>
<property name="tooltip_text">Switch it</property>
</object>
</child>
</object>

View File

@ -133,6 +133,9 @@
<object class="GtkImage" id="image1">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label1"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -143,6 +146,9 @@
<object class="GtkImage" id="image2">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label2"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -153,6 +159,9 @@
<object class="GtkImage" id="image3">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
</object>
<packing>
<property name="left-attach">2</property>
@ -163,6 +172,9 @@
<object class="GtkImage" id="image4">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label4"/>
</accessibility>
</object>
<packing>
<property name="left-attach">3</property>
@ -173,6 +185,9 @@
<object class="GtkImage" id="image5">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label5"/>
</accessibility>
</object>
<packing>
<property name="left-attach">4</property>
@ -183,6 +198,9 @@
<object class="GtkImage" id="image6">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label6"/>
</accessibility>
</object>
<packing>
<property name="left-attach">5</property>
@ -197,6 +215,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image1"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -211,6 +232,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image2"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>
@ -225,6 +249,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image3"/>
</accessibility>
</object>
<packing>
<property name="left-attach">2</property>
@ -239,6 +266,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image4"/>
</accessibility>
</object>
<packing>
<property name="left-attach">3</property>
@ -253,6 +283,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image5"/>
</accessibility>
</object>
<packing>
<property name="left-attach">4</property>
@ -267,6 +300,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image6"/>
</accessibility>
</object>
<packing>
<property name="left-attach">5</property>

View File

@ -3464,9 +3464,12 @@ bad things might happen.</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="title_label">
<property name="label">Title:</property>
<property name="xalign">1</property>
<accessibility>
<relation type="label-for" target="open_popover_entry"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -3474,10 +3477,13 @@ bad things might happen.</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="description_label">
<property name="valign">start</property>
<property name="label">Description:</property>
<property name="xalign">1</property>
<accessibility>
<relation type="label-for" target="open_popover_textview"/>
</accessibility>
</object>
<packing>
<property name="left-attach">0</property>
@ -3493,7 +3499,11 @@ bad things might happen.</property>
<property name="min-content-width">100</property>
<property name="max-content-width">100</property>
<child>
<object class="GtkTextView" id="open_popover_textview"/>
<object class="GtkTextView" id="open_popover_textview">
<accessibility>
<relation type="labelled-by" target="description_label"/>
</accessibility>
</object>
</child>
</object>
<packing>
@ -3504,6 +3514,9 @@ bad things might happen.</property>
<child>
<object class="GtkEntry" id="open_popover_entry">
<property name="activates-default">1</property>
<accessibility>
<relation type="labelled-by" target="title_label"/>
</accessibility>
</object>
<packing>
<property name="left-attach">1</property>