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

Bug 323995

Summary: [Accessibility] StyledText selection incorrect after caret moved event
Product: [Eclipse Project] Platform Reporter: Carolyn MacLeod <carolynmacleod4>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact: Carolyn MacLeod <carolynmacleod4>
Severity: normal    
Priority: P3 CC: daniel_megert, john.arthorne, Silenio_Quarti
Version: 3.6.1Keywords: accessibility
Target Milestone: 3.6.1Flags: john.arthorne: pmc_approved+
Silenio_Quarti: review+
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch from Felipe none

Description Carolyn MacLeod CLA 2010-08-30 12:38:24 EDT
Eclipse 3.6.1 RC2.

One of the JAWS developers sent me an email saying IAccessibleText::selection in StyledText was incorrect after he received a "caret moved" event.

It turns out that this is because JAWS runs in-process, and StyledText does indeed send "caret moved" before finalizing the selection.

When testing with AccProbe running out-of-process, this discrepancy went unnoticed, because the selection is finalized before an out-of-process client can ask for it.
Comment 1 Carolyn MacLeod CLA 2010-08-30 12:40:35 EDT
Created attachment 177750 [details]
Patch from Felipe
Comment 2 Carolyn MacLeod CLA 2010-08-30 12:47:29 EDT
I discovered how to test Felipe's patch with AccProbe. The Event Monitor view allows getting in-context events. I tested with using shift+arrow key to change selection (which was the exact problem that the JAWS developer reported), as well as various combinations of arrow keys with or without shift, shift+HOME/END, as well as shift+mouse click.

The selection is now correctly reported in all cases that I tested.
Are there any other cases I should test for?
Comment 3 Carolyn MacLeod CLA 2010-08-30 12:50:01 EDT
SSQ, can you please review the patch for possible inclusion in 3.6.1?
I looked at the code, and it seems ok to me, however I do not know if it covers all cases, and I do not know if I tested all cases.

If it looks good to you as well, then I would like to bring it forward to the PMC for inclusion in 3.6.1.
Comment 4 John Arthorne CLA 2010-08-30 14:01:22 EDT
+1. I reviewed the patch with Silenio and Car. I witnessed the bug occurring before the fix (incorrect selection reported by in-process screen reader), and that the selection is correct when the fix is applied. We also tested corner cases such as the caret changing but the selection staying unchanged.
Comment 5 Carolyn MacLeod CLA 2010-08-30 14:06:59 EDT
Fixed > 20100830 in 3.6.1 stream and in HEAD.
Comment 6 Dani Megert CLA 2010-08-31 01:59:25 EDT
>+1. I reviewed the patch with Silenio and Car.
John, please update the pmc_approved flag if you approve a bug as PMC for RC3 and beyond. Thanks.
Comment 7 Dani Megert CLA 2010-08-31 02:00:18 EDT
>>+1. I reviewed the patch with Silenio and Car.
>John, please update the pmc_approved flag if you approve a bug as PMC for RC3
>and beyond. Thanks.
Oops! It was actually there. Not sure why I didn't see it. Sorry for the spam.