[orca] Prefer the name of a button, even if it implements AtkText
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Prefer the name of a button, even if it implements AtkText
- Date: Mon, 7 Apr 2014 12:25:11 +0000 (UTC)
commit 7f7b135f9f3b371a2c30c4d4183742b91bfd3249
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Apr 7 08:24:08 2014 -0400
Prefer the name of a button, even if it implements AtkText
src/orca/script_utilities.py | 4 ++++
src/orca/scripts/toolkits/Gecko/script.py | 3 ++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index e55da68..224bfb6 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -558,6 +558,10 @@ class Utilities:
except (LookupError, RuntimeError):
role = None
+ role = obj.getRole()
+ if role == pyatspi.ROLE_PUSH_BUTTON and obj.name:
+ return obj.name
+
if role == pyatspi.ROLE_COMBO_BOX:
displayedText = self._displayedTextInComboBox(obj)
if self.DISPLAYED_TEXT not in self._script.generatorCache:
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index f7a92e5..41e7516 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -3602,7 +3602,8 @@ class Script(default.Script):
#
if not len(string) \
or self.utilities.isEntry(obj) \
- or self.utilities.isPasswordText(obj):
+ or self.utilities.isPasswordText(obj) \
+ or role == pyatspi.ROLE_PUSH_BUTTON and obj.name:
rv = self.speechGenerator.generateSpeech(obj)
# Crazy crap to make clump and friends happy until we can
# kill them. (They don't deal well with what the speech
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]