[orca] Only prefer the name of links when it's author-provided



commit b3e29a2693d493be8f1b666f5ba0d3f83d312327
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Sep 13 09:06:53 2018 -0400

    Only prefer the name of links when it's author-provided

 src/orca/scripts/web/speech_generator.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 8ea30e22d..4ef94f3d1 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -179,6 +179,10 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_SPIN_BUTTON]:
             return super()._generateName(obj, **args)
 
+        if self._script.utilities.isLink(obj) \
+           and not self._script.utilities.hasExplicitName(obj):
+            return []
+
         if self._script.utilities.inDocumentContent(obj) and obj.name:
             result = [obj.name]
             result.extend(self.voice(speech_generator.DEFAULT))


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