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 486912 - Labels do not support accessible text very well
Labels do not support accessible text very well
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 2.22.0
Assigned To: Rich Burridge
Orca Maintainers
Depends on:
Blocks: 468098
 
 
Reported: 2007-10-15 18:40 UTC by Willie Walker
Modified: 2008-07-22 19:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revision #1 (751 bytes, patch)
2007-11-27 17:12 UTC, Rich Burridge
committed Details | Review

Description Willie Walker 2007-10-15 18:40:38 UTC
Steps to reproduce:

1) Run the "Dialog and message boxes" demo of gtk-demo

2) Bring up the "Message Dialog" window.

3) Tab to the "This message box has been popped up the following number of times:" label.

Several things are broken:

  * Selection information isn't presented properly.  This includes when new text is selected and unselected

  * Cursor/caret position isn't shown properly in braille (it always thinks it is at the beginning of the text)

  * Characters are not spoken as you arrow over them
Comment 1 Willie Walker 2007-10-15 18:42:42 UTC
Where Am I doesn't present the text selection information, either.  :-(

For all intents and purposes, this probably should be treated like an uneditable text entry area that was prepopulated with text.
Comment 2 Willie Walker 2007-10-26 22:00:23 UTC
See also test/keystrokes/gtk-demo/role_label.py.
Comment 3 Rich Burridge 2007-11-27 16:29:03 UTC
Just tried this with the latest version of Orca from SVN trunk:

> Several things are broken:
>
>   * Selection information isn't presented properly.  This includes when new
> text is selected and unselected

When I initially Tab to this label, I get:

SPEECH OUTPUT: ''
SPEECH OUTPUT: 'This message box has been popped up the following
number of times: selected label'

If I then press a Left or Right arrow key to unselect the text, nothing
is spoken.

Mike/Will, what should be spoken for those two cases?

>  * Cursor/caret position isn't shown properly in braille (it always thinks it
> is at the beginning of the text)

Agreed. I'll look at this next.

>  * Characters are not spoken as you arrow over them

This is working just fine for me.
Comment 4 Rich Burridge 2007-11-27 17:12:51 UTC
Created attachment 99727 [details] [review]
Revision #1

The attached patch seems to correctly handle setting
the cursor/caret position correctly for the braille 
display.

The _getBrailleRegionsForLabel() method now has identical
code to the _getBrailleRegionsForText() method. A better
fix might just be to do:

        self.brailleGenerators[pyatspi.ROLE_LABEL]               = \
             self._getBrailleRegionsForText

In testing this, I found another related bug. If you
Shift-Left or Shift-Right along the label, it doesn't
speak or braille anything.

If this was a text object, we would be getting
"object:text-caret-moved" events and handling it there.

For the label, we are just getting "object:text-selection-changed"
events, and that is currently a self.noOp in default.py.

So the question here is, should we adjust default.py to
be something like:

        listeners["object:text-selection-changed"]          = \
            self.onTextSelectionChanged

and then create a new onTextSelectionChanged() that checks if this
is a label and does something similar to what's done in
onCaretMoved() for text objects, or should we file a bug against
atk/gail and get them to send us an "object:text-caret-moved"
event for this label action? Or both?

Will, what would you like me to do for this case?
Comment 5 Willie Walker 2007-11-30 16:07:32 UTC
> onCaretMoved() for text objects, or should we file a bug against
> atk/gail and get them to send us an "object:text-caret-moved"
> event for this label action? Or both?
> 
> Will, what would you like me to do for this case?

Rich and I discussed this on the phone -- it looks like a bug in the label code.  A bug that the text-caret-moved events are not being fired should be logged.  Thanks Rich!
Comment 6 Rich Burridge 2007-11-30 16:28:30 UTC
I've open bug #500679 on the Shift-Left/Shift-Right problem.
Comment 7 Rich Burridge 2007-12-04 23:05:32 UTC
We discussed this bug in the Orca team meeting this afternoon.
Mike is fine with the way that the label's selected text is 
currently spoken (concern #1 in comment #3). 

We've also filed bug #500679, to get "object:text-caret-moved"
events, so that we can treat labels like text objects. As that 
wasn't a direct concern of this bug and the other problems have
been addressed, I've just gone ahead and committed the patch 
attached to this bug, and have put the bug into a "[pending]" state.

Thanks.

Comment 8 Mike Pedersen 2007-12-04 23:23:01 UTC
looks good 
Comment 9 Rich Burridge 2007-12-04 23:34:56 UTC
Thanks. Closing as FIXED.
Comment 10 Rich Burridge 2007-12-05 06:41:12 UTC
Reminder to self: still need to adjust test/keystrokes/gtk-demo/role_label.py