orca r4417 - in branches/gnome-2-24: . src/orca test/keystrokes/firefox
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r4417 - in branches/gnome-2-24: . src/orca test/keystrokes/firefox
- Date: Fri, 9 Jan 2009 16:33:35 +0000 (UTC)
Author: wwalker
Date: Fri Jan 9 16:33:34 2009
New Revision: 4417
URL: http://svn.gnome.org/viewvc/orca?rev=4417&view=rev
Log:
Fix for Bug #566954 - ARIA toggle button state not handled correctly.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/orca/braillegenerator.py
branches/gnome-2-24/src/orca/default.py
branches/gnome-2-24/src/orca/speechgenerator.py
branches/gnome-2-24/test/keystrokes/firefox/uiuc_button.py
Modified: branches/gnome-2-24/src/orca/braillegenerator.py
==============================================================================
--- branches/gnome-2-24/src/orca/braillegenerator.py (original)
+++ branches/gnome-2-24/src/orca/braillegenerator.py Fri Jan 9 16:33:34 2009
@@ -1085,7 +1085,8 @@
componentRegion = braille.Component(
obj, text,
indicator=settings.brailleRadioButtonIndicators[ \
- int(state.contains(pyatspi.STATE_CHECKED))])
+ int(state.contains(pyatspi.STATE_CHECKED) \
+ or state.contains(pyatspi.STATE_PRESSED))])
regions.append(componentRegion)
return [regions, componentRegion]
Modified: branches/gnome-2-24/src/orca/default.py
==============================================================================
--- branches/gnome-2-24/src/orca/default.py (original)
+++ branches/gnome-2-24/src/orca/default.py Fri Jan 9 16:33:34 2009
@@ -978,6 +978,8 @@
self.onStateChanged
listeners["object:state-changed:checked"] = \
self.onStateChanged
+ listeners["object:state-changed:pressed"] = \
+ self.onStateChanged
listeners["object:state-changed:indeterminate"] = \
self.onStateChanged
listeners["object:state-changed:expanded"] = \
@@ -7724,7 +7726,9 @@
None)
state_change_notifiers[pyatspi.ROLE_PANEL] = ("showing", None)
state_change_notifiers[pyatspi.ROLE_LABEL] = ("showing", None)
-state_change_notifiers[pyatspi.ROLE_TOGGLE_BUTTON] = ("checked", None)
+state_change_notifiers[pyatspi.ROLE_TOGGLE_BUTTON] = ("checked",
+ "pressed",
+ None)
state_change_notifiers[pyatspi.ROLE_TABLE_CELL] = ("checked",
"expanded",
None)
Modified: branches/gnome-2-24/src/orca/speechgenerator.py
==============================================================================
--- branches/gnome-2-24/src/orca/speechgenerator.py (original)
+++ branches/gnome-2-24/src/orca/speechgenerator.py Fri Jan 9 16:33:34 2009
@@ -1702,7 +1702,8 @@
utterances = []
state = obj.getState()
- if state.contains(pyatspi.STATE_CHECKED):
+ if state.contains(pyatspi.STATE_CHECKED) \
+ or state.contains(pyatspi.STATE_PRESSED):
# Translators: the state of a toggle button.
#
checkedState = _("pressed")
Modified: branches/gnome-2-24/test/keystrokes/firefox/uiuc_button.py
==============================================================================
--- branches/gnome-2-24/test/keystrokes/firefox/uiuc_button.py (original)
+++ branches/gnome-2-24/test/keystrokes/firefox/uiuc_button.py Fri Jan 9 16:33:34 2009
@@ -33,7 +33,7 @@
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.AssertPresentationAction(
"tab to first button",
- ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button & y Italic i ToggleButton Bold B Button'",
+ ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button &=y Italic i ToggleButton Bold B Button'",
" VISIBLE: 'Font Larger + Button Font Smalle', cursor=1",
"SPEECH OUTPUT: 'Text Formating Controls 1 list'",
"SPEECH OUTPUT: 'Font Larger + button'"]))
@@ -47,7 +47,7 @@
sequence.append(PauseAction(3000))
sequence.append(utils.AssertPresentationAction(
"basic whereamI",
- ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button & y Italic i ToggleButton Bold B Button'",
+ ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button &=y Italic i ToggleButton Bold B Button'",
" VISIBLE: 'Font Larger + Button Font Smalle', cursor=1",
"SPEECH OUTPUT: 'Font Larger +'",
"SPEECH OUTPUT: 'button'",
@@ -70,8 +70,8 @@
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.AssertPresentationAction(
"tab to second button",
- ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button & y Italic i ToggleButton Bold B Button'",
- " VISIBLE: 'Font Smaller - Button & y Italic', cursor=1",
+ ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button &=y Italic i ToggleButton Bold B Button'",
+ " VISIBLE: 'Font Smaller - Button &=y Italic', cursor=1",
"SPEECH OUTPUT: ''",
"SPEECH OUTPUT: 'Font Smaller - button'"]))
@@ -91,10 +91,10 @@
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.AssertPresentationAction(
"tab to third button",
- ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button & y Italic i ToggleButton Bold B Button'",
- " VISIBLE: '& y Italic i ToggleButton Bold B', cursor=1",
+ ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button &=y Italic i ToggleButton Bold B Button'",
+ " VISIBLE: '&=y Italic i ToggleButton Bold B', cursor=1",
"SPEECH OUTPUT: ''",
- "SPEECH OUTPUT: 'Italic i toggle button not pressed'"]))
+ "SPEECH OUTPUT: 'Italic i toggle button pressed'"]))
########################################################################
# Now push the third button. The following will be presented.
@@ -103,7 +103,9 @@
sequence.append(TypeAction(" "))
sequence.append(utils.AssertPresentationAction(
"push third button",
- [""]))
+ ["BRAILLE LINE: 'Font Larger + Button Font Smaller - Button & y Italic i ToggleButton Bold B Button'",
+ " VISIBLE: '& y Italic i ToggleButton Bold B', cursor=1",
+ "SPEECH OUTPUT: 'not pressed'"]))
########################################################################
# Tab to the fourth button. The following will be presented.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]