Repository: nvaccess/nvda

Issue:
Report status in Braille when downloading files in Chrome 
<!-- 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.
-->

### Is your feature request related to a problem? Please describe.

As reported by Sergio via email, the status of files is reported in speech, but not in Braille when download files in Chrome.  Having the ability to have this information reported in Braille would be useful for those who rely on Braille either exclusively, or more than speech.

### Describe the solution you'd like

Report that the download is starting and when it is complete, and possibly status in between as needed, as is done in speech.

### Describe alternatives you've considered

I'm not sure if this was deliberately omitted to keep the Braille display uncluttered with constant messages, but if that is the case, perhaps some way of choosing which messages are reported?

### Additional context
I tested using:
NVDA 2022.4.0.27401 
Windows 11 (64-bit) Version: 22H2, Build: 22621.1105 
Chrome Version: 108.0.5359.126 

I noted that Microsoft Edge, Version: 109.0.1518.55 approaches it slightly differently, displaying a message when a file is downloaded and this is reported.



Discussion:
Hi, Edge: uses UIA notification event, resulting in speech and braille announcing file download progress. I bet Chrome does not implement the same event here – perhaps it might be using an alert event. Thanks.


It does look like Edge have implemented a different notification than Chrome - although to be clear, NVDA does at least report "Download complete" in speech, it just isn't presented in Braille.
Hi,

Technical: turns out braille output isn't even considered in alert event for IAccessible objects (grrr)!

I'm testing to see if it affects just Chrome or Firefox as well.

Thanks.

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/__init__.py b/source/NVDAObjects/IAccessible/__init__.py
--- a/source/NVDAObjects/IAccessible/__init__.py
+++ b/source/NVDAObjects/IAccessible/__init__.py
@@ -1,5 +1,5 @@
 # A part of NonVisual Desktop Access (NVDA)
-# Copyright (C) 2006-2022 NV Access Limited, Babbage B.V.
+# Copyright (C) 2006-2023 NV Access Limited, Babbage B.V.
 # This file is covered by the GNU General Public License.
 # See the file COPYING for more details.
 
@@ -1688,7 +1688,7 @@ def event_valueChange(self):
 			return
 		return super(IAccessible, self).event_valueChange()
 
-	def event_alert(self):
+	def event_alert(self) -> None:
 		if self.role != controlTypes.Role.ALERT:
 			# Ignore alert events on objects that aren't alerts.
 			return
@@ -1702,9 +1702,11 @@ def event_alert(self):
 		if self in api.getFocusAncestors():
 			return
 		speech.speakObject(self, reason=controlTypes.OutputReason.FOCUS, priority=speech.Spri.NOW)
+		braille.handler.message(braille.getPropertiesBraille(name=self.name, role=self.role))
 		for child in self.recursiveDescendants:
 			if controlTypes.State.FOCUSABLE in child.states:
 				speech.speakObject(child, reason=controlTypes.OutputReason.FOCUS, priority=speech.Spri.NOW)
+				braille.handler.message(braille.getPropertiesBraille(name=self.name, role=self.role))
 
 	def event_caret(self):
 		focus = api.getFocusObject()


Test patch: