After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455230 - Read table cell row should insert column headers for non-text cells
Read table cell row should insert column headers for non-text cells
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: 2.20.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-09 17:30 UTC by Willie Walker
Modified: 2008-07-22 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A first "feel the water" patch. (2.45 KB, patch)
2007-07-10 16:24 UTC, Rich Burridge
needs-work Details | Review
Revised patch (speech only at this point). (2.66 KB, patch)
2007-07-10 19:16 UTC, Rich Burridge
none Details | Review
Further revised patch (includes braille support). (4.71 KB, patch)
2007-07-10 20:21 UTC, Rich Burridge
none Details | Review
Further revised patch based on feedback from Mike. (4.72 KB, patch)
2007-07-12 20:57 UTC, Rich Burridge
none Details | Review
Revised version of the patch. (4.46 KB, patch)
2007-07-13 15:25 UTC, Rich Burridge
committed Details | Review

Description Willie Walker 2007-07-09 17:30:28 UTC
When looking at the Tree Store demo from the Tree View section of gtk-demo, we see a table with many cells composed solely of checkboxes.  When navigating up/down by row and when read table cell row is enabled, the user only hears the role/state of the check boxes.

In the cases where we run into situations like this (e.g., cells with unlabelled checkboxes), it would be desirable to have the read table cell row present the column header information prior to the checkbox role/state.  For example:

"New Year's Day Alex checkbox checked havoc checkbox checked..."

Note that when navigating up/down by row when read table cell row is not enabled, normal contextual information should be presented.  Thus, when navigating up/down, only the new row header (if it exists) should be presented, and when navigating left/right, only the new column header (if it exists) should be presented.
Comment 1 Rich Burridge 2007-07-10 16:24:29 UTC
Created attachment 91552 [details] [review]
A first "feel the water" patch.

Before I take this too much further, I want to make sure I'm
on the right track. If we are doing "speak table cell row"
and we move to a new row, then for each table cell that has
a "toggle" action, we precede the speaking of that table 
cell with speaking the table column header.

This patch just uses self._getSpeechForTableColumnHeader()
to get what should be spoken for the table column header.
Therefore it's also speaking the rolename ("column
header") by default. Do we want that?

I've removed the non-visible text cell renderers from the
text attribute pane in the Orca preference dialog, so that's
one test case to try. The other is the Tree Store sub-demo
in gtk-demo. Notice that it speaks the hidden checkboxes on
lines like "February". What should we be checking so that those
hidden checkboxes aren't spoken? Doesn't look like "VISIBLE" 
state will work. If I'm on the "February" row and in the "Tim" 
column, here's the state of that table cell:

          +-name=None role='table cell' state='ACTIVE ENABLED FOCUSABLE SELECTABLE SELECTED SENSITIVE SHOWING TRANSIENT VISIBLE' relations=''

Note that I haven't done the matching braillegenerator changes yet.
I wanted to make sure we had consensus on the speech changes first.

Thanks.
Comment 2 Willie Walker 2007-07-10 16:55:35 UTC
> Before I take this too much further, I want to make sure I'm
> on the right track. If we are doing "speak table cell row"
> and we move to a new row, then for each table cell that has
> a "toggle" action, we precede the speaking of that table 
> cell with speaking the table column header.

This seems close, except that it seems like it might be too verbose for cells that have labelled checkboxes.  So, you might want to check to see if there is any text associated with the checkbox before inserting the column header information.

> This patch just uses self._getSpeechForTableColumnHeader()
> to get what should be spoken for the table column header.
> Therefore it's also speaking the rolename ("column
> header") by default. Do we want that?

I don't think we want 'column header' in there, but Mike's the better one to answer that.

> in gtk-demo. Notice that it speaks the hidden checkboxes on
> lines like "February". What should we be checking so that those
> hidden checkboxes aren't spoken? Doesn't look like "VISIBLE" 
> state will work. If I'm on the "February" row and in the "Tim" 
> column, here's the state of that table cell:
> 
>           +-name=None role='table cell' state='ACTIVE ENABLED FOCUSABLE
> SELECTABLE SELECTED SENSITIVE SHOWING TRANSIENT VISIBLE' relations=''

Bummer.  I'm not sure what we can do for those.  I guess presenting them is all we can do for now.  :-(

Comment 3 Mike Pedersen 2007-07-10 17:10:00 UTC
> 
> > This patch just uses self._getSpeechForTableColumnHeader()
> > to get what should be spoken for the table column header.
> > Therefore it's also speaking the rolename ("column
> > header") by default. Do we want that?
> 
> I don't think we want 'column header' in there, but Mike's the better one to
> answer that.
Will is correct here.
Comment 4 Rich Burridge 2007-07-10 19:16:16 UTC
Created attachment 91567 [details] [review]
Revised patch (speech only at this point).

Incorporates feedback from Will and Mike (thanks).
If this is what we want, then please let me know and
I'll go ahead and implement the equivalent on the 
braille side.
Comment 5 Rich Burridge 2007-07-10 20:21:03 UTC
Created attachment 91575 [details] [review]
Further revised patch (includes braille support).

Please test.
Comment 6 Rich Burridge 2007-07-10 21:09:49 UTC
The special code in the Evolution script for handling checkbox
table cells in the mail message header list at the moment does
the following:

       # Check if the current table cell is a check box. If it
       # is, then to reduce verbosity, only speak and braille it,
       # if it's checked or if we are moving the focus from to the
       # left or right on the same row.
       #
       # The one exception to the above is if this is for the
       # Status checkbox, in which case we speak/braille it if
       # the message is unread (not checked).

This also means that we speak "Read" instead of the column header
(which is "Status").

In short, I don't think there is any advantage in taking it out and
using the new "default" table cell column header code. It will
be a lot more verbose and use will also lose the Status==>Read.

I suggest we keep the special Evolution scripting code in "as is".
Comment 7 Willie Walker 2007-07-10 22:38:26 UTC
> I suggest we keep the special Evolution scripting code in "as is".

Sounds good.  Thanks for looking into it.
Comment 8 Mike Pedersen 2007-07-11 19:44:08 UTC
I've just applied this patch and restarted orca.  When I arrow down the rows in the treestore demo I just hear "checkbox checked, checkbox checked" and so on.  When arrowing down by row I would also expect to hear the name before the checkbox.
Comment 9 Rich Burridge 2007-07-11 22:32:17 UTC
Are you "reading by cell" or "reading by row"? From Will's initial
bug description:

"Note that when navigating up/down by row when read table cell row is not
enabled, normal contextual information should be presented.  Thus, when
navigating up/down, only the new row header (if it exists) should be presented,
and when navigating left/right, only the new column header (if it exists)
should be presented."

If I have "reading by row" enabled, it speaks/brailles the whole row for me.
If I have "reading by cell" enabled, and I'm just moving up and down, then it
justs speaks/brailles the current cell (no column header).

I understood this to be the desired behavior...

Yeah, yeah, yeah. I should be resting up. But the pain's minimal (probably
the pain killers having worn off yet). I'm just feeling woozy. Hopefully 
that's not having an effect on this comment.
Comment 10 Mike Pedersen 2007-07-12 19:53:26 UTC
I just re-tested this and the speech side seems to work great.  The only thing I'd like to see changed is to put the label on the braille display after the actual check box.  Currently it is before.  This will be consistant with our other implementation of checkboxes in dialog boxes.  
Comment 11 Rich Burridge 2007-07-12 20:57:11 UTC
Created attachment 91701 [details] [review]
Further revised patch based on feedback from Mike.

Hopefully the checkbox and labels are now in reverse order.
Comment 12 Mike Pedersen 2007-07-13 01:50:45 UTC
This now seems to be working nicely when panning across the row.  The problem is that when arrowing across the columns the labels are still before the checkbox.  I'm thinking that the labels should be after the checkboxes in this case as well.
Comment 13 Rich Burridge 2007-07-13 13:50:29 UTC
> This now seems to be working nicely when panning across the row.  The problem
> is that when arrowing across the columns the labels are still before the
> checkbox.  I'm thinking that the labels should be after the checkboxes in this
> case as well.

This is caused by the code in braillegenerator._getBrailleRegionsForTableCell()
at about line 1143:

        else:
            [cellRegions, focusRegion] = self._getDefaultBrailleRegions(\
                self._script.getRealActiveDescendant(obj))
            regions[0].extend(cellRegions)

The _getDefaultBrailleRegions() method is the fallback braille generator 
should no other specialized braille generator exist for this object. It
handles the labels and roles in the opposite order to what we now have
in the table cell handling code.

I suspect reversing the order we do things in that routine will 
adversely affect the brailling of a lot of other objects.

Will, what is the best way to fix this?
Comment 14 Rich Burridge 2007-07-13 15:24:20 UTC
Will, worked out what was going wrong. I needed to do the text for
a checkboxed table cell with no label in _getBrailleRegionsForTableCell()
not in _getBrailleRegionsForTableCellRow(). New patch top follow.
Comment 15 Rich Burridge 2007-07-13 15:25:25 UTC
Created attachment 91742 [details] [review]
Revised version of the patch.

Mike, hopefully this will fixup your last concern (and still keep
all the original functionality).
Comment 16 Mike Pedersen 2007-07-13 17:21:08 UTC
Now I think this patch looks great.  It really is nicer in several places than what we had before.  thanks much for doing it. 
Comment 17 Rich Burridge 2007-07-13 18:33:35 UTC
Thanks Mike. Patch committed. Putting the bug in the "[pending]" state.
Comment 18 Mike Pedersen 2007-07-20 22:25:50 UTC
looks good 
Comment 19 Rich Burridge 2007-07-21 22:25:58 UTC
Closing as fixed.