Repository: nvaccess/nvda

Issue:
NVDA doesn't beep on Java Progress bars
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/blob/master/devDocs/githubIssueTemplateExplanationAndExamples.md
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.md. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests. 

Each of the questions and sections below start with multiple hash symbols (#). Place your answers and information on the blank line below each question.
-->

### Steps to reproduce:
Open a Java app that contains a progress bar (for example I tested with this gist https://gist.github.com/brunosantanati/3c9e5778ba591b6218b6a210da1fc17f or Intellij).

### Actual behavior:
NVDA does not beep or speak the percentage when it finds a Java progress bar.

### Expected behavior:
NVDA should beep or speak on the progress bar, depending on the progress bar setting set.

### System configuration
#### NVDA installed/portable/running from source:
I tested with installed 2021.3.3 and source-master-c446688 and on both the bug occurs.

#### NVDA version:
Tested on 2021.3.3 and on source-master-c446688.

#### Windows version:
Tested with Windows 10 1903, but since it's a Java issue it might occur on previor or later versions of Windows.

#### Name and version of other software in use when reproducing the issue:
Tested with Java 11.0.14.1 (Intellij) and Java 17.0.2 (example gist).

#### Other information about your system:

### Other questions
#### Does the issue still occur after restarting your computer?
Yes.

#### Have you tried any other versions of NVDA? If so, please report their behaviors.
I tried both 2021.3.3 and source-master-c446688, it still occurs.

#### 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?
Since  it was a bug on the access bridge handling code, I did not run it, but I imagine it does.



Discussion:
I will  send a pull request for this issue, I created the issue to send the pull request.

Resolving patch:
diff --git a/source/NVDAObjects/JAB/__init__.py b/source/NVDAObjects/JAB/__init__.py
--- a/source/NVDAObjects/JAB/__init__.py
+++ b/source/NVDAObjects/JAB/__init__.py
@@ -12,7 +12,7 @@
 import textUtils
 from controlTypes import TextPosition
 from ..window import Window
-from ..behaviors import EditableTextWithoutAutoSelectDetection, Dialog
+from ..behaviors import ProgressBar, EditableTextWithoutAutoSelectDetection, Dialog
 import textInfos.offsets
 from logHandler import log
 from .. import InvalidNVDAObject
@@ -210,6 +210,9 @@ def findOverlayClasses(self,clsList):
 			clsList.append(Table)
 		elif self.parent and isinstance(self.parent,Table) and self.parent._jabTableInfo:
 			clsList.append(TableCell)
+		elif role == "progress bar":
+			clsList.append(ProgressBar)
+
 		clsList.append(JAB)
 
 	@classmethod


Test patch: