[orca/570658] Fix for the redundant filler/radio button group label
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] Fix for the redundant filler/radio button group label
- Date: Mon, 6 Jul 2009 17:16:06 +0000 (UTC)
commit 81523b9ec5134f220c2905118685fcdfcc13b4f6
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Mon Jul 6 13:11:44 2009 -0400
Fix for the redundant filler/radio button group label
src/orca/braille_generator.py | 3 ++-
test/keystrokes/firefox/xul_role_radio_button.py | 9 ++++-----
test/keystrokes/gtk-demo/role_radio_button.py | 11 +++++------
3 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index 35c0f5d..0d9db19 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -208,7 +208,8 @@ class BrailleGenerator(generator.Generator):
# container for the grouped objects. When we detect this,
# we add the label to the overall context.]]]
#
- if parent.getRole() == pyatspi.ROLE_FILLER:
+ if parent.getRole() == pyatspi.ROLE_FILLER \
+ and obj.getRole() != pyatspi.ROLE_RADIO_BUTTON:
label = self._script.getDisplayedLabel(parent)
if label and len(label) and not label.isspace():
args['role'] = parent.getRole()
diff --git a/test/keystrokes/firefox/xul_role_radio_button.py b/test/keystrokes/firefox/xul_role_radio_button.py
index bde4a5a..4f2686a 100755
--- a/test/keystrokes/firefox/xul_role_radio_button.py
+++ b/test/keystrokes/firefox/xul_role_radio_button.py
@@ -29,8 +29,7 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("<Alt>a"))
sequence.append(utils.AssertPresentationAction(
"Alt a to radio button group",
- ["BUG? - In all four of these tests, we are duplicating 'Range' before and after the role 'Filler' in the braille context.",
- "BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range Filler Range &=y All Pages RadioButton'",
+ ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range &=y All Pages RadioButton'",
" VISIBLE: '&=y All Pages RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range All Pages selected radio button'"]))
@@ -42,7 +41,7 @@ sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
sequence.append(utils.AssertPresentationAction(
"Basic Where Am I",
- ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range Filler Range &=y All Pages RadioButton'",
+ ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range &=y All Pages RadioButton'",
" VISIBLE: '&=y All Pages RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range All Pages radio button selected item 1 of 3.'",
"SPEECH OUTPUT: 'Alt a'"]))
@@ -54,7 +53,7 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Down"))
sequence.append(utils.AssertPresentationAction(
"Down Arrow to next radio button",
- ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range Filler Range & y Pages: RadioButton'",
+ ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range & y Pages: RadioButton'",
" VISIBLE: '& y Pages: RadioButton', cursor=1",
"SPEECH OUTPUT: 'Pages: not selected radio button'"]))
@@ -66,7 +65,7 @@ sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
sequence.append(utils.AssertPresentationAction(
"Basic Where Am I",
- ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range Filler Range &=y Pages: RadioButton'",
+ ["BRAILLE LINE: '" + utils.firefoxAppNames + " Application Print Dialog TabList General Page Range &=y Pages: RadioButton'",
" VISIBLE: '&=y Pages: RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range Pages: radio button selected item 3 of 3.'",
"SPEECH OUTPUT: 'Alt e'"]))
diff --git a/test/keystrokes/gtk-demo/role_radio_button.py b/test/keystrokes/gtk-demo/role_radio_button.py
index a5219cb..5fadb14 100644
--- a/test/keystrokes/gtk-demo/role_radio_button.py
+++ b/test/keystrokes/gtk-demo/role_radio_button.py
@@ -33,8 +33,7 @@ sequence.append(KeyComboAction("<Alt>a", 500))
sequence.append(WaitForFocus("All Pages", acc_role=pyatspi.ROLE_RADIO_BUTTON))
sequence.append(utils.AssertPresentationAction(
"All Pages radio button",
- ["BUG? - In all of these tests, we are duplicating 'Range' before and after the role 'Filler' in the braille context.",
- "BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range Filler Range &=y All Pages RadioButton'",
+ ["BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range &=y All Pages RadioButton'",
" VISIBLE: '&=y All Pages RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range All Pages selected radio button'"]))
@@ -46,7 +45,7 @@ sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
sequence.append(utils.AssertPresentationAction(
"All Pages radio button Where Am I",
- ["BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range Filler Range &=y All Pages RadioButton'",
+ ["BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range &=y All Pages RadioButton'",
" VISIBLE: '&=y All Pages RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range All Pages radio button selected item 1 of 3.'",
"SPEECH OUTPUT: 'Alt a'"]))
@@ -68,7 +67,7 @@ sequence.append(WaitForFocus("Pages:", acc_role=pyatspi.ROLE_RADIO_BUTTON))
sequence.append(utils.AssertPresentationAction(
"Range radio button",
["KNOWN ISSUE - the radio button should be presented as selected.",
- "BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range Filler Range & y Pages: RadioButton'",
+ "BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range & y Pages: RadioButton'",
" VISIBLE: '& y Pages: RadioButton', cursor=1",
"SPEECH OUTPUT: 'Pages: not selected radio button'"]))
@@ -80,7 +79,7 @@ sequence.append(KeyComboAction("KP_Enter"))
sequence.append(PauseAction(3000))
sequence.append(utils.AssertPresentationAction(
"Range radio button Where Am I",
- ["BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range Filler Range &=y Pages: RadioButton'",
+ ["BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range &=y Pages: RadioButton'",
" VISIBLE: '&=y Pages: RadioButton', cursor=1",
"SPEECH OUTPUT: 'Range Pages: radio button selected item 3 of 3.'",
"SPEECH OUTPUT: 'Alt e'"]))
@@ -94,7 +93,7 @@ sequence.append(WaitForFocus("All Pages", acc_role=pyatspi.ROLE_RADIO_BUTTON))
sequence.append(utils.AssertPresentationAction(
"All Pages radio button",
["KNOWN ISSUE - the radio button should be presented as selected.",
- "BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range Filler Range & y All Pages RadioButton'",
+ "BRAILLE LINE: 'gtk-demo Application Print Dialog TabList General Page Range & y All Pages RadioButton'",
" VISIBLE: '& y All Pages RadioButton', cursor=1",
"SPEECH OUTPUT: 'All Pages not selected radio button'"]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]