eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

[Bug] text cannot be read by Screen Reader when updating document

Open yanshudan opened this issue 10 months ago • 6 comments

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

From a fresh installation and clean workspace:

Create a blank Eclipse plugin project Install Screen Reader NVDA

I tried

try to call IDocumnent.replace() to add some text to a document

I expected: the added text should be announced by NVDA

But got: Nothing announeced by Screen Reader

Here is some relevant log output

Tested under this environment:

  • OS & version: Win11
  • Eclipse IDE/Platform version 2024-09
  • ...Anything else that can be useful...

Community

  • [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

yanshudan avatar Feb 13 '25 03:02 yanshudan

The Eclipse Document layer is a bit too high to evaluate that. Can you please try with to derive an example using StyledText.setText() and showcasing a similar error from one of the examples in eclipse.platform.swt/examples/org.eclipse.swt.snippets ?

mickaelistria avatar Feb 13 '25 08:02 mickaelistria

I have tried calling StyledText.setText(msg), screen reader cannot announce the content of msg.

yanshudan avatar Feb 14 '25 03:02 yanshudan

I've also tried these. All cannot be announced b y Screen Reader.

      styledText.insert();
      styledText.append();
      styledText.replaceTextRange();

yanshudan avatar Feb 14 '25 05:02 yanshudan

Hi @mickaelistria , do I have to showcase the error in eclipse.platform.swt/examples/org.eclipse.swt.snippets? I guess things are the same as long as I call the same API.

yanshudan avatar Feb 17 '25 05:02 yanshudan

@yanshudan Is the issue actually reproducible with some of the snippets? The smaller(less libraries/jars involved) the reproducer the easier it is to investigate an issue.

akurtakov avatar Feb 17 '25 08:02 akurtakov

Thanks for the details. One thing I sincerely don't know is whether it's expected that each change coming from API gets announced. I don't really know how other frameworks deal with it. As you can imagine, there are ton of API calls that alterate the UI, and we cannot get all of them read as they're being processed. So how to choose? Or maybe the change is announced only if widget has focus?

mickaelistria avatar Feb 17 '25 08:02 mickaelistria