gtk/testsuite/a11y/image.c
Matthias Clasen efd4169fa2 a11y: Set accessible roles for GtkImage and GtkPicture
Use the img accessible role for these.
Also update the documentation and add tests.
2020-07-28 18:16:37 -04:00

35 lines
642 B
C

#include <gtk/gtk.h>
static void
image_role (void)
{
GtkWidget *widget = gtk_image_new ();
g_object_ref_sink (widget);
gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG);
g_object_unref (widget);
}
static void
picture_role (void)
{
GtkWidget *widget = gtk_picture_new ();
g_object_ref_sink (widget);
gtk_test_accessible_assert_role (widget, GTK_ACCESSIBLE_ROLE_IMG);
g_object_unref (widget);
}
int
main (int argc, char *argv[])
{
gtk_test_init (&argc, &argv, NULL);
g_test_add_func ("/a11y/image/role", image_role);
g_test_add_func ("/a11y/picture/role", picture_role);
return g_test_run ();
}