[orca] Fix speech generator for browser alerts.



commit 21d709ffebe2aa5f68061913eae376c83ab4753c
Author: Eitan Isaacson <eitan monotonous org>
Date:   Wed Oct 20 11:19:21 2021 -0700

    Fix speech generator for browser alerts.
    
    The description of the alert isn't used because the speech generator
    picks up the "usedDescriptionForName" flag that the braille generator
    set. The flag is not reset in the speech generator because the web
    speech generator doesn't call the super name generator where it would
    typically be reset.

 src/orca/generator.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index e9a9d89de..920fd3d24 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -236,6 +236,9 @@ class Generator:
             msg = '%s GENERATOR: Starting generation for %s' % (self._mode.upper(), obj)
             debug.println(debug.LEVEL_INFO, msg, True)
 
+            # Reset 'usedDescriptionForName' if a previous generator used it.
+            self._script.pointOfReference['usedDescriptionForName'] = False
+
             debuginfo = lambda x: self._resultElementToString(x, False)
             assert(formatting)
             while True:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]