nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.09k stars 631 forks source link

The notifications are not being announced in IntelliJ/Android Studio (IntelliJ based IDEs) #17240

Closed akash07k closed 2 days ago

akash07k commented 1 week ago

Steps to reproduce:

Prerequisite: Ensure that a screen reader is running like NVDA and "Support Screen Readers" checkbox is checked in IntelliJ/Android Studio settings.

  1. Go to File Menu > Settings (After opening a project in IntelliJ/Android Studio).
  2. Go to Appearance and Behaviour > Notifications.
  3. Go to the notifications list and enable any of the notifications (Multiple can be enabled).
  4. Verify if "Display Baloon Notifications" checkbox is checked.
  5. Verify if "Enable System Notification" checkbox is checked.
  6. Choose any of the 2 values in "Announce With Screen Reader" dropdown such as: "After the Current Output is Finished" or "Interrupting the Current Output.
  7. Enable any of the notification such as "Build succeeded", Gradle, Android or any of your choice.
  8. Choose anything in "Popup Type" dropdown such as "Baloon", "Sticky Baloon", or "Tool Window".
  9. Apply the settings and click on "Ok" button.
  10. Perform any action such as executing a build (Make sure that you have enabled Build, Gradle, Android etc notifications).
  11. Observe, NVDA does not announce any notifications at all no matter what notification you enable and what setting you choose.

Actual behavior:

None of the IntelliJ/Android Studio notifications are being announced by NVDA. Whenever we enable any notifications from Android Studio settings, those notifications are not being announced by NVDA. I have checked the "Play sound" checkbox for every notification, and the sound plays for each of them. It clearly shows that the notifications are working, however they are not being nnounced and therefore, it is not possible for NVDA users to identify the critical events such as build failed, build succeeded and tons of others. I have verified the same with JAWS and all of the notifications are being announced by it. Therefore, this does not seem an IntelliJ/Android Studio issue in any way.

Expected behavior:

The notifications should be announced by NVDA.

NVDA logs, crash dumps and other attachments:

Attached the log. nvda.log

System configuration

NVDA installed/portable/running from source:

Tried both.

NVDA version:

Tried several versions starting from 2022.1 to latest 2024.4 Beta 5. Current build: NVDA 2024.4 Beta 5.

Windows version:

Tried with several builds. Current build: Microsoft Windows [Version 10.0.22635.4291]

Name and version of other software in use when reproducing the issue:

  1. IntelliJ Version: 2024.2.3.
  2. Android Studio version: 2024.2.1.9 as well as latest canary: 2024.2.2.4.
  3. JAVA JDK: latest 21 as well as tried older 17.

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes, everytime.

Have you tried any other versions of NVDA? If so, please report their behaviors.

Yes, tried all the versions starting from 2022.1 to current 2024.4 Beta 5. However, the same issue persists with all the versions and builds. Even tried NVDA snapshots too, but same issue.

If NVDA add-ons are disabled, is your problem still occurring?

Yes,

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

SaschaCowley commented 6 days ago

@akash07k

I assume that an Android Studio notification occurred between when you hit enter on "Build APK(s)" and when you opened the NVDA log viewer. Is that right?

Can you please reproduce the issue with event logging enabled as well as debug logging? To do this:

  1. Quit NVDA, and select "Restart with debug logging enabled" in the exit dialog.
  2. When NVDA restarts, open Settings (NVDA menu -> Preferences -> Settings...)
  3. Navigate to the Advanced category (it should be the last category)
  4. Tick "I understand that changing these settings may cause NVDA to function incorrectly."
  5. Tab to Enabled logging categories, then use the arrow keys to move to events, and tick it.
  6. Press OK to apply the settings.
  7. Reproduce the issue with notifications, and send the resulting log.
  8. You may want to run "Revert to saved configuration" (in the NVDA menu) or manually disable event logging, as this may use a lot of space.
akash07k commented 6 days ago

@SaschaCowley No, that's not right. build notifications sometime take a while to appear because build can take up to some seconds. Also, this issue is occuring for all types notifications including but not limited to build. Still, I'm attaching the logs as you requested (Event logging enabled). Please find them attached with this comment. nvda-events.log

@akash07k

I assume that an Android Studio notification occurred between when you hit enter on "Build APK(s)" and when you opened the NVDA log viewer. Is that right?

Can you please reproduce the issue with event logging enabled as well as debug logging? To do this:

  1. Quit NVDA, and select "Restart with debug logging enabled" in the exit dialog.
  2. When NVDA restarts, open Settings (NVDA menu -> Preferences -> Settings...)
  3. Navigate to the Advanced category (it should be the last category)
  4. Tick "I understand that changing these settings may cause NVDA to function incorrectly."
  5. Tab to Enabled logging categories, then use the arrow keys to move to events, and tick it.
  6. Press OK to apply the settings.
  7. Reproduce the issue with notifications, and send the resulting log.
  8. You may want to run "Revert to saved configuration" (in the NVDA menu) or manually disable event logging, as this may use a lot of space.
dmitrii-drobotov commented 6 days ago

@akash07k thanks for the detailed description! I was able to reproduce and understand the problem, and can confirm that it's not a bug on the NVDA side. Notifications in IntelliJ work through NVDA Controller client library, and it needs to be included as a part of bundled JDK in IntelliJ. However, I see that Android Studio doesn't include this library, and that's the reason notifications are not announced there, so I will report it to the Android Studio team.

In the meantime, you can try the following workaround for Android Studio:

  1. Use action "Choose Boot Java Runtime for the IDE"
  2. In the opened dialog, expand the "New" combo box and select "21.0.4b509.17 JetBrains Runtime JBR with JCEF (bundled by default)", or any other version which has "(bundled by default)" at the end.
  3. Click OK, wait until the JDK is downloaded.
  4. A restart dialog should appear, in it press the Restart Now button.

After the restart, notifications should start working because the downloaded JDK should contain the NVDA controller library.

Additionally, if you get this issue in IntelliJ IDEA, you can try the same "Choose Boot Java Runtime for the IDE" dialog, but this time press the "Use Default Runtime" button, which should reset any changes to the JDK. The default runtime should contain the library.

akash07k commented 6 days ago

@dmitrii-drobotov Amazing, thanks a lot for the help. The workaround worked like a charm and I must say that you have resolved a biggest concern of mine with Android studio. Really thanks a lot from the bottom of my heart. Please give me the link to the issue once you log it with Android Studio/IntelliJ. In my case, I get this issue with both of these.

@akash07k thanks for the detailed description! I was able to reproduce and understand the problem, and can confirm that it's not a bug on the NVDA side. Notifications in IntelliJ work through NVDA Controller client library, and it needs to be included as a part of bundled JDK in IntelliJ. However, I see that Android Studio doesn't include this library, and that's the reason notifications are not announced there, so I will report it to the Android Studio team.

In the meantime, you can try the following workaround for Android Studio:

  1. Use action "Choose Boot Java Runtime for the IDE"
  2. In the opened dialog, expand the "New" combo box and select "21.0.4b509.17 JetBrains Runtime JBR with JCEF (bundled by default)", or any other version which has "(bundled by default)" at the end.
  3. Click OK, wait until the JDK is downloaded.
  4. A restart dialog should appear, in it press the Restart Now button.

After the restart, notifications should start working because the downloaded JDK should contain the NVDA controller library.

Additionally, if you get this issue in IntelliJ IDEA, you can try the same "Choose Boot Java Runtime for the IDE" dialog, but this time press the "Use Default Runtime" button, which should reset any changes to the JDK. The default runtime should contain the library.

seanbudd commented 5 days ago

Is this something that could be added to our user guide, under Application specific features? It seems not intuitive for users - I think we need to report this to JetBrains or explicitly document this in NVDA

SaschaCowley commented 5 days ago

@dmitrii-drobotov thanks for this. I'm going to re-open so we can continue to track this on our side.

dmitrii-drobotov commented 5 days ago

@akash07k you're welcome, glad it was resolved! If you can still reproduce it in IntelliJ IDEA, could you please provide the following information for troubleshooting purposes:

  1. Open the Help menu (Alt+H)
  2. Select the About menu item
  3. Press the Copy and Close button
  4. Attach the copied info here. I'm only interested in the first few lines related to the build number, Runtime and VM versions, so you can remove the rest. Specifically, I need the following info:
    IntelliJ IDEA 2024.2.3 (Ultimate Edition)
    Build #IU-242.23339.11, built on September 25, 2024
    Runtime version: 21.0.4+13-b509.17 amd64 (JCEF 122.1.9)
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

@seanbudd this feature in IntelliJ is intended to work out of the box and shouldn't require such complex configuration. Hopefully, this bug will be resolved in the coming versions, so I don't think the workaround needs to be documented. Also, I see that this functionality is not well described in the IntelliJ documentation, so I think we can at least start there.

akash07k commented 5 days ago

Luckily it I was able to resolve it in IntelliJ after resetting the java boot version to default. However, I feel that till the time Android studio fixes this issue natively, it is better to document this workaround in NVDA docs so that people who are coming to Android studio and are plagued by this issue can know about the workaround and therefore can make their life easier. @seanbudd

@akash07k you're welcome, glad it was resolved! If you can still reproduce it in IntelliJ IDEA, could you please provide the following information for troubleshooting purposes:

  1. Open the Help menu (Alt+H)
  2. Select the About menu item
  3. Press the Copy and Close button
  4. Attach the copied info here. I'm only interested in the first few lines related to the build number, Runtime and VM versions, so you can remove the rest. Specifically, I need the following info:
IntelliJ IDEA 2024.2.3 (Ultimate Edition)
Build #IU-242.23339.11, built on September 25, 2024
Runtime version: 21.0.4+13-b509.17 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

@seanbudd this feature in IntelliJ is intended to work out of the box and shouldn't require such complex configuration. Hopefully, this bug will be resolved in the coming versions, so I don't think the workaround needs to be documented. Also, I see that this functionality is not well described in the IntelliJ documentation, so I think we can at least start there.

seanbudd commented 2 days ago

Thanks for explaining further @dmitrii-drobotov - I think we can close this then