[orca] Always present the name of buttons, even if the parent has the same name



commit e1759e98ba1fc1b674e084c36f923539d153d522
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Nov 5 15:05:29 2019 -0500

    Always present the name of buttons, even if the parent has the same name

 src/orca/scripts/web/speech_generator.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index dbbe6ef90..0d9526adc 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -217,9 +217,11 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
             return []
 
         role = args.get('role', obj.getRole())
+        alwaysPresent = [pyatspi.ROLE_PUSH_BUTTON,
+                         pyatspi.ROLE_IMAGE]
 
         if obj.parent and obj.name and obj.name == obj.parent.name \
-           and obj != orca_state.locusOfFocus and role != pyatspi.ROLE_IMAGE:
+           and obj != orca_state.locusOfFocus and role not in alwaysPresent:
             return []
 
         # TODO - JD: Once the formatting strings are vastly cleaned up


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