Hi,
I noticed today, when using the native dialogs addon that my screen reader (yes, I'm blind) did some weird things with it. The main thing was that it didn't seem to focus the dialog (or that's what I assume was happening) after it was created, causing jaws (that's my screen reader) to get focused on the system tray. I had to alt tab back to the window where the dialog was to get jaws to read it. I'm not sure if this is something to do with the window not being focused or the dialog (although I'd suspect the dialog as it did it when I made a new dialog after the first one was dismissed).
Thanks,
-Michael.
With which dialogues does that happen? File dialogues or message boxes? Can you reproduce this behaviour? Can you give a minimal code sample?
Hi,
Yes I can reproduce it, and I had a friend test my test program with another screen reader called NVDA and it happens to him as well. NVDA is free, so if you wanted to test it yourself then that would probably be the optimal way to go (the link for NVDA is: http://nvda-project.org).
It happens with the al_show_native_message_box on windows, and I haven't tested the file dialog yet. Minimal code is below:
#include <allegro5/allegro.h>
#include <allegro5/allegro_native_dialog.h>
int main(int argc, char **argv) {
ALLEGRO_DISPLAY* display = NULL;
al_init(); // not checking error to decrease code size on the forum.
display = al_create_display(640, 480);
al_clear_to_color(al_map_rgb(0, 0, 0));
al_show_native_message_box(display, "test, "just testing a screen reader problem", "This will not be read by your screen reader until you alt tab into the window", NULL, 0); //If you don't alt tab back into the window, your screen reader gets put on the task bar.
al_destroy_display(display);
}
Also one other thing I noticed is that when you alt tab back into the window, it still won't let you read the dialog with a standard "read window:" command in the screen reader until you focus a button like the yes/no button by tabbing. If you try, again it simply reads the task bar. However, when there's only an ok button, it's impossible to tab to the ok button because (I'm guessing) the window says you can't tab to something when there's only one button in the window. Perhaps there's a way to set focus to a button as well or something -- this is all speculation, of course.
Thanks,
-Michael.
Need some help from someone who knows Win32.
We call MessageBoxW to open the message box. When we give the window handle of the display to MessageBoxW, the new window inherits(?) the window proc of the normal Allegro window. For some reason, due to the way the window proc handles the messages, the message box doesn't gain focus when it is created.
Does that make sense? I think what we want to do is create the message box with the default window proc.