Re: making accessible to my gtk application in different platforms designed in c language

2021-06-05 Thread Lucas Radaelli via gnome-accessibility-list
First of all, great questions! I think you really expressed yourself 
well there.



In order for a graphical interface to be accessible it needs to talk to 
the operational system accessibilityAPIs, informing how the application 
is being built (aka how it is providing its semantic tree in case you 
are curious to learn more about it).



It is also my understanding that gtk does not provide this support on 
windows yet.



One recommendation is to use a graphical interface that is accessible in 
both platforms. I have heard people using wx to create accessible 
applications on windows, but I haven't used it myself to say if it is 
accessible on linux as well.




Em 6/5/2021 9:45 AM, Jason White via gnome-accessibility-list escreveu:
My understanding is that GTK is not accessible with screen readers 
under Microsoft Windows, but it can be under Linux. Support for 
non-Linux environments is on the development agenda for GTK 4.


On 5/6/21 6:05 am, chandan dora via gnome-accessibility-list wrote:

hello friends, I need to learn the concept, of how the gtk gui
applications designed in c language can be accessible in different
platforms, especially in microsoft windows and linux. to make a clear
understand of this concept, I implemented a very simple gtk gui
applications in c as follows:


#include 

int main (int argc, char *argv [] )
{
GtkWidget *window;
GtkWidget *button;

gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Accessible program");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 150);
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);



/* I am going to creat a button element and add it to display it on
the toplevel window */
button = gtk_button_new_with_label ("OK");
gtk_widget_set_halign (button, GTK_ALIGN_START+20);
gtk_widget_set_valign (button, GTK_ALIGN_START+20);
/* also I am going to display a tooltip on this buttonr, when I drag a
mouse pointer on it. */
gtk_widget_set_tooltip_text (button, "this is a small descriptive text
related to this button element");

gtk_container_add (GTK_CONTAINER (window), button);

gtk_widget_show_all (window);

g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK
(gtk_main_quit), NULL);

gtk_main ();

return 0;
}


after implementing this program, I compiled it on linux (kali linux
distro) as follows:
gcc main.c -o main.out `pkg-config --cflags --libs gtk+-3.0`

and run it as follows:
./main.out

before running the main.out program, I had enabled the orca screen
reader to test whether the program is accessible by screen reader or
not. and then run the main.out program.
after running this program, I noted that, a new window was opened
which displayed a button element with a tooltip on the screen.
simultaneously, I heard that of orca is announcing, "accessible
program frame. OK push button. this is a small descriptive text
related to this button element". it means that, a new window created
in a frame, whose title is "accessible program". "ok push button"
means, currently the focus is on the OK button element of the window.
"this is a small descriptive text related to this button" means, the
orca announces this message because I added a tooltip to this button
while implementing this program, and since the main focus is on this
button, right now, hence the orca announces this tooltip.
everything was fine till now in the linux environment. one moment!
let's move a bit for a while to the microsoft windows desktop
environment.
I compiled this source code in the microsoft windows desktop
environment version 10, using gcc compiler as follows:
on the windows command prompt, I executed the following commands to
compile the source code:
echo gcc main.c -o main.exe > run.bat
pkg-config --cflags --libs gtk+-3.0 >> run.bat
then, on the command prompt:
run

I got no error and my program was compiled successfully. then I simply
type main on the command prompt and press enter.
note: before I run the main.exe file on my windows 10 environment, I
had installed JAWS (job access with speech) screen reader, which is
the most popular screen reader for windows operating system. however,
I also used the narator screen reader to test the accessibility of my
program using screen reader.
actually, the problem is there, after running the main.exe program on
this platform. it runs successfully, and a new window is open. it
displays all the elements of the window. but no screen reader neither
JAWS nor narator can properly interact with this application. while
opening a new window, the screen readers are announcing just the title
of the window, "accessible program" in my case. but nothing else.
the screen readers are neither announcing the button element, nor
announcing the tooltip of the button. this is the problem. if I will
take orca into my consideration, it was fine with this main.out
program.
to understand this problem more clearly, on the command prompt, I run
another program called 

Re: making accessible to my gtk application in different platforms designed in c language

2021-06-05 Thread Jason White via gnome-accessibility-list
My understanding is that GTK is not accessible with screen readers under 
Microsoft Windows, but it can be under Linux. Support for non-Linux 
environments is on the development agenda for GTK 4.


On 5/6/21 6:05 am, chandan dora via gnome-accessibility-list wrote:

hello friends, I need to learn the concept, of how the gtk gui
applications designed in c language can be accessible in different
platforms, especially in microsoft windows and linux. to make a clear
understand of this concept, I implemented a very simple gtk gui
applications in c as follows:


#include 

int main (int argc, char *argv [] )
{
GtkWidget *window;
GtkWidget *button;

gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Accessible program");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 150);
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);



/* I am going to creat a button element and add it to display it on
the toplevel window */
button = gtk_button_new_with_label ("OK");
gtk_widget_set_halign (button, GTK_ALIGN_START+20);
gtk_widget_set_valign (button, GTK_ALIGN_START+20);
/* also I am going to display a tooltip on this buttonr, when I drag a
mouse pointer on it. */
gtk_widget_set_tooltip_text (button, "this is a small descriptive text
related to this button element");

gtk_container_add (GTK_CONTAINER (window), button);

gtk_widget_show_all (window);

g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK
(gtk_main_quit), NULL);

gtk_main ();

return 0;
}


after implementing this program, I compiled it on linux (kali linux
distro) as follows:
gcc main.c -o main.out `pkg-config --cflags --libs gtk+-3.0`

and run it as follows:
./main.out

before running the main.out program, I had enabled the orca screen
reader to test whether the program is accessible by screen reader or
not. and then run the main.out program.
after running this program, I noted that, a new window was opened
which displayed a button element with a tooltip on the screen.
simultaneously, I heard that of orca is announcing, "accessible
program frame. OK push button. this is a small descriptive text
related to this button element". it means that, a new window created
in a frame, whose title is "accessible program". "ok push button"
means, currently the focus is on the OK button element of the window.
"this is a small descriptive text related to this button" means, the
orca announces this message because I added a tooltip to this button
while implementing this program, and since the main focus is on this
button, right now, hence the orca announces this tooltip.
everything was fine till now in the linux environment. one moment!
let's move a bit for a while to the microsoft windows desktop
environment.
I compiled this source code in the microsoft windows desktop
environment version 10, using gcc compiler as follows:
on the windows command prompt, I executed the following commands to
compile the source code:
echo gcc main.c -o main.exe > run.bat
pkg-config --cflags --libs gtk+-3.0 >> run.bat
then, on the command prompt:
run

I got no error and my program was compiled successfully. then I simply
type main on the command prompt and press enter.
note: before I run the main.exe file on my windows 10 environment, I
had installed JAWS (job access with speech) screen reader, which is
the most popular screen reader for windows operating system. however,
I also used the narator screen reader to test the accessibility of my
program using screen reader.
actually, the problem is there, after running the main.exe program on
this platform. it runs successfully, and a new window is open. it
displays all the elements of the window. but no screen reader neither
JAWS nor narator can properly interact with this application. while
opening a new window, the screen readers are announcing just the title
of the window, "accessible program" in my case. but nothing else.
the screen readers are neither announcing the button element, nor
announcing the tooltip of the button. this is the problem. if I will
take orca into my consideration, it was fine with this main.out
program.
to understand this problem more clearly, on the command prompt, I run
another program called notepad.exe. to run the notepad, on the command
prompt, I type "notepad" without quotation mark, and press enter.
but its so amazing !! the screen readers are announcing everything
after opening notepad. some questions stuck  in my mind:
  1.why can the screen readers not access my program correctly in
windows platform?
2. the orca screen reader in linux can properly interact with my
program. but in windows, the JAWS and narator aren't. why?
3. the other programs like ms word, notepad, etc are accessible by
screen readers in windows platform. but it cannot access my program
properly. what should I do to my program, to make it properly
accessible by screen readers in windows platform?

having these questions in my mind, I