GTK+ Windows accessibility issue



Hi everyone,

recently I've received the mail from a blind user of my program complaining about accessibility issues.
Program is GTK+ 2.x based, he tried Windows edition.

One of the things he mentioned is that pressing Alt key in the main window should cause the first item in the menu bar to become focused.

I've checked other programs and it seems that:
1. Windows native programs (see Notepad for example) obey this behavior, pressing Alt does set focus to a first menu bar item
2. created basic GTK program with menu bar, this behavior is not obeyed (see test source code below)
3. tried few Qt-based programs, this works fine for Qt

My questions:
- is this unsupported?
- any plans to get this implemented?

More info on user:
- OS: windows 7
- screen readers: "I am using JAWS and NVDA."

Thanks for any tip, I'd like to improve the program accessibility for my users.

Regards,
  Miroslav

PS. Sample code:

#include <gtk/gtk.h>

void create_window();

GtkWidget *window1;
GtkWidget *vbox1;
GtkWidget *menubar1;
GtkWidget *menu1;
GtkWidget *item1;

int main (int argc, char *argv[])
{
    gtk_init (&argc, &argv);
    create_window();
    gtk_main ();
    return 0;
}

#ifdef _WIN32
#include <windows.h>
int APIENTRY WinMain( HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR lpCmdLine, int nCmdShow)
{
    return main( __argc, __argv );
}
#endif

void create_window()
{
    window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title (GTK_WINDOW (window1), "test");
    gtk_widget_show (window1);
    g_signal_connect (window1, "destroy", G_CALLBACK (gtk_main_quit), NULL);

    vbox1 = gtk_vbox_new (FALSE, 0);
    gtk_widget_show (vbox1);
    gtk_container_add (GTK_CONTAINER (window1), vbox1);

    menubar1 = gtk_menu_bar_new ();
    gtk_widget_show (menubar1);
    gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);

    //create menu items
    item1 = gtk_menu_item_new_with_mnemonic ("_File");
    gtk_widget_show (item1);
    gtk_container_add (GTK_CONTAINER (menubar1), item1);

    menu1 = gtk_menu_new ();
    gtk_menu_item_set_submenu (GTK_MENU_ITEM (item1), menu1);

    item1 = gtk_image_menu_item_new_with_mnemonic ("_Quit");
    gtk_widget_show (item1);
    gtk_container_add (GTK_CONTAINER (menu1), item1);

    item1 = gtk_menu_item_new_with_mnemonic("_Edit");
    gtk_widget_show(item1);
    gtk_container_add(GTK_CONTAINER(menubar1), item1);

    menu1 = gtk_menu_new();
    gtk_menu_item_set_submenu(GTK_MENU_ITEM(item1), menu1);

    item1 = gtk_image_menu_item_new_with_mnemonic("_Action");
    gtk_widget_show(item1);
    gtk_container_add(GTK_CONTAINER(menu1), item1);
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]