Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311308

Summary: StyledText should read text even if caret is set to 'null'
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: SWTAssignee: Carolyn MacLeod <carolynmacleod4>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: carolynmacleod4, eclipse.felipe, sergionevess, Silenio_Quarti
Version: 3.6Keywords: accessibility
Target Milestone: 3.7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
StyledText Snippet with caret set to null none

Description Dani Megert CLA 2010-05-02 06:02:06 EDT
3.6 M7.

See bug 293263 for details.
Comment 1 Carolyn MacLeod CLA 2010-05-02 12:00:54 EDT
Retest the steps in bug 293263 with setCaret(null) after IAccessibleText support is added to JAWS. Test Orca as well.
Comment 2 Sérgio Neves CLA 2010-05-03 01:46:53 EDT
Sorry for my ignorance. I don't know if I can ask these questions here, but I don't know another place to do it. Does it make sense for screen readers to read a textbox character by character, even which the caret is set to null? For me, it has logic that, if the caret is set to null, it ton't be possible to navigate with the caret and, consequently, impossible to read characters. It seems a contradition. Can you explain this to me?
Thanks.
Comment 3 Dani Megert CLA 2010-05-03 02:17:50 EDT
As we saw it can happen that someone sets the caret to 'null'. In this case, I think it would be good that as soon as you set the focus to the widget it at least reads you the whole text.
Comment 4 Sérgio Neves CLA 2010-05-03 10:27:18 EDT
Oh! Understood. I have the same thought. Thanks.
Comment 5 Sérgio Neves CLA 2010-05-04 03:59:14 EDT
Unlike JAWS screen reader, that doesn't read all the text when tabbing to it even if caret is set to null, NVDA screen reader does it well.
Comment 6 Carolyn MacLeod CLA 2010-08-24 16:04:26 EDT
Just a quick update on this.

I tested with NVDA as Sergio mentioned, and it really does do a good job of allowing the user to navigate with arrow keys even when there is no caret.
(I'm not really sure how it does this, actually <grin>)

I also tested with Window-Eyes, and when there is no caret, Window-Eyes reads the entire text. I believe this is an acceptable alternative.

JAWS, however, does not read a multi-line text when it gets focus, and it does not allow arrow-key navigation unless there is a caret. I am going to mention this to the JAWS developers.

For now, however, I don't think there is much that I can do from the SWT side.
I will leave this bug open to report JAWS feedback.
I am changing the target milestone to 3.7.
Comment 7 Carolyn MacLeod CLA 2010-09-01 11:37:36 EDT
Created attachment 177972 [details]
StyledText Snippet with caret set to null

I have just been told by a JAWS developer that this has been fixed in JAWS 12 (which hasn't shipped yet). He confirmed that he can run the attached snippet and arrow down in the StyledText and read the text line by line. He also confirmed that the same snippet does not work with JAWS 11.

So, just to reiterate, JAWS 12, NVDA, and Window-Eyes can all read a StyledText with no caret. So I am going to close this bug.

Dani, I'm not sure what you would like to do with the About dialog (recall that in bug 293263 you commented out the line for setCaret(null) so that JAWS 11 would read the About dialog and some other places). However as soon as JAWS 12 ships (due out in Q4 2010) this will work with three screen readers, so if you prefer not to have the blinking cursor in those read-only texts, I think you can safely turn it off again.
Comment 8 Carolyn MacLeod CLA 2010-09-01 11:38:23 EDT
Closing as "works for me".
Comment 9 Dani Megert CLA 2010-09-02 01:41:57 EDT
I can live with the current solution.