Re: [orca-list] Accessible Chess - Orca and XBoard
- From: "Nalin.x.Linux" <nalin x linux gmail com>
- To: Joanmarie Diggs <jdiggs igalia com>
- Cc: Orca List <orca-list gnome org>
- Subject: Re: [orca-list] Accessible Chess - Orca and XBoard
- Date: Sun, 12 Jul 2015 23:07:03 +0530
1. You SHOULD have an object whose role is status bar. This is the
horizontally-oriented container at the bottom of the xboard window.
That bar is NOT a notification; in any other application, that bar
would have the role of status bar. In xboard, it should also have the
role of status bar. By the way, Orca even has a command to read an
application's status bar (assuming the status bar is accessible and
has the role of status bar). By changing the status bar to role
notification you have:
a. Broken that Orca command's functionality for your application.
b. Set the groundwork for potential unwanted chattiness in the future
(which I'll explain momentarily).
c. Made it impossible for me to filter out the word "notification"
properly, and handling status bar notifications separately from
desktop environment pop-up notifications.
2. You should ALSO have an object whose role is notification INSIDE (as
in packed into) the object whose role is status bar. That object
should have the label (whose role is label) INSIDE the notification.
Looking at that portion of the accessible tree in Accerciser should
result in something that looks like:
-> ROLE_STATUS_BAR
-> ROLE_NOTIFICATION
-> ROLE_LABEL (text: "a-2 white pawn")
If you do that you solve all of the above problems because:
a. The Orca command which looks for the status bar will find it
because it has the expected role.
b. If xboard developers later add other status bar labels which
should NOT be spoken automatically, they can do so. In Accerciser
it might look something like:
-> ROLE_STATUS_BAR
-> ROLE_NOTIFICATION
-> ROLE_LABEL (text: "a-2 white pawn")
-> ROLE_PANEL
-> ROLE_LABEL (text: "opponent is thinking")
-> ROLE_PANEL
-> ROLE_LABEL (text: "time elapsed: 00:25:31")
Would you want to hear the text from all three labels each time
you moved to a different square on the board?
Related aside: Were I you, I'd probably add a code comment
indicating why the status bar has a child with role notification
so that xboard developers don't do that for non-notification
status bar labels.
c. I've just committed a change to Orca master which should filter
out the word "notification" properly (i.e. NOT by having users
use the pronunciation dictionary to set the pronunciation of that
word to nothing). BUT that change in Orca will do this only for
status bar notifications. It works by seeing if the object with
role notification has an ancestor with role status bar (such as
is shown in the sample trees above).
Please let me know if you have any questions. Thanks!
--joanie
Ahh first of all I agree with you. The solution i got is as follows
GtkWidget *frame_inner = gtk_frame_new(NULL);
gtk_container_add(GTK_CONTAINER(frame_inner), label);
GtkWidget *frame_outer = gtk_frame_new(NULL);
gtk_container_add(GTK_CONTAINER(frame_outer), frame_inner);
AtkObject *atk_ob1;
atk_ob1 = gtk_widget_get_accessible (GTK_WIDGET(frame_inner));
atk_object_set_role(atk_ob1,ATK_ROLE_NOTIFICATION);
AtkObject *atk_ob2;
atk_ob2 = gtk_widget_get_accessible (GTK_WIDGET(frame_outer));
atk_object_set_role(atk_ob2,ATK_ROLE_STATUSBAR);
label = frame_outer;
Pack(hbox, grid, label, left, left+r, top, 0);
Everything is working fine, accessible tree in Accerciser now looks
as ROLE_STATUS_BAR, ROLE_NOTIFICATION, ROLE_LABEL. But orca is not
announcing status-bar when I press the key to say status bar. Should I
make real GtkStatusbar instead of casting the frame role to
ROLE_STATUS_BAR ?
--
Free Software Free Society
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]