[orca/gnome-3-0] Fix for bug #431030 - GtkStatusIcon objects don't have accessible names
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-0] Fix for bug #431030 - GtkStatusIcon objects don't have accessible names
- Date: Wed, 4 May 2011 11:57:19 +0000 (UTC)
commit be2175f8495975fa1c228a61bc5ed5868d6197d4
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Wed May 4 07:57:08 2011 -0400
Fix for bug #431030 - GtkStatusIcon objects don't have accessible names
src/orca/formatting.py | 2 +-
src/orca/generator.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index df15003..a9332ce 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -398,7 +398,7 @@ formatting = {
#pyatspi.ROLE_HTML_CONTAINER: 'default'
pyatspi.ROLE_ICON: {
'unfocused': '[Component(obj,\
- asString(label + displayedText + imageDescription + roleName))]'
+ asString(((label + displayedText + imageDescription) or name) + roleName))]'
},
#pyatspi.ROLE_IMAGE: 'default'
pyatspi.ROLE_LABEL: {
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 4eef8d3..92069b2 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -294,6 +294,11 @@ class Generator:
result.append(name)
elif obj.description:
result.append(obj.description)
+ # To make the unlabeled icons in gnome-panel more accessible.
+ if not result and obj.getRole() == pyatspi.ROLE_ICON \
+ and obj.parent.getRole() == pyatspi.ROLE_PANEL:
+ return self._generateName(obj.parent)
+
return result
def _generateLabelAndName(self, obj, **args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]