summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-10-27 18:13:44 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-10-27 18:13:44 +0000
commit0c49f7349d80a7cc929fd511397984ca900ab7b9 (patch)
tree9a12302307e9a062d05ef136f64ff54c2e0842d6 /testsuite
parent08004d4eed2ff5fb7b25673001b9632fbaf5b8e4 (diff)
parentc783e9aa5fe0dbb09c25eb4151136649073e09a4 (diff)
downloadgtk+-0c49f7349d80a7cc929fd511397984ca900ab7b9.tar.gz
Merge branch 'matthiasc/a11y-buildable' into 'master'
Implement accessible attributes for ui files See merge request GNOME/gtk!2751
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/ui/a11y1.expected1
-rw-r--r--testsuite/gtk/ui/a11y1.ui15
-rw-r--r--testsuite/gtk/ui/a11y2.expected1
-rw-r--r--testsuite/gtk/ui/a11y2.ui30
-rw-r--r--testsuite/gtk/ui/a11y3.expected1
-rw-r--r--testsuite/gtk/ui/a11y3.ui16
6 files changed, 64 insertions, 0 deletions
diff --git a/testsuite/gtk/ui/a11y1.expected b/testsuite/gtk/ui/a11y1.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y1.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y1.ui b/testsuite/gtk/ui/a11y1.ui
new file mode 100644
index 0000000000..e185ca9842
--- /dev/null
+++ b/testsuite/gtk/ui/a11y1.ui
@@ -0,0 +1,15 @@
+<!-- test accessible states with a variety of values -->
+<interface>
+ <object class="GtkButton">
+ <accessibility>
+ <state name="busy">t</state>
+ <state name="checked">mixed</state>
+ <state name="disabled">true</state>
+ <state name="expanded">undefined</state>
+ <state name="hidden">True</state>
+ <state name="invalid">grammar</state>
+ <state name="pressed">undefined</state>
+ <state name="selected">0</state>
+ </accessibility>
+ </object>
+</interface>
diff --git a/testsuite/gtk/ui/a11y2.expected b/testsuite/gtk/ui/a11y2.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y2.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y2.ui b/testsuite/gtk/ui/a11y2.ui
new file mode 100644
index 0000000000..8dc8bbfb15
--- /dev/null
+++ b/testsuite/gtk/ui/a11y2.ui
@@ -0,0 +1,30 @@
+<interface>
+ <!-- test some accessible properties -->
+ <object class="GtkBox">
+ <child>
+ <object class="GtkButton">
+ <accessibility>
+ <property name="autocomplete">both</property>
+ <property name="description" translatable="yes">Bah</property>
+ <property name="has-popup">1</property>
+ <property name="key-shortcuts">shortcuts go here</property>
+ <property name="label" translatable="yes">label?</property>
+ <property name="level">99</property>
+ <property name="modal">no</property>
+ <property name="multi-line">0</property>
+ <property name="multi-selectable">false</property>
+ <property name="orientation">horizontal</property>
+ <property name="placeholder" translatable="yes">placeholder?</property>
+ <property name="read-only">F</property>
+ <property name="required">False</property>
+ <property name="role-description">Dunno</property>
+ <property name="sort">ascending</property>
+ <property name="value-max">11</property>
+ <property name="value-min">0</property>
+ <property name="value-now">10</property>
+ <property name="value-text" translatable="yes">Ten</property>
+ </accessibility>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/testsuite/gtk/ui/a11y3.expected b/testsuite/gtk/ui/a11y3.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/a11y3.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/a11y3.ui b/testsuite/gtk/ui/a11y3.ui
new file mode 100644
index 0000000000..1979f9bbb7
--- /dev/null
+++ b/testsuite/gtk/ui/a11y3.ui
@@ -0,0 +1,16 @@
+<!-- test accessible relations -->
+<interface>
+ <object class="GtkBox">
+ <child>
+ <object class="GtkButton">
+ <accessibility>
+ <relation name="labelled-by">label</relation>
+ <relation name="controls">label</relation>
+ </accessibility>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label"/>
+ </child>
+ </object>
+</interface>