orca r3567 - in trunk: . src/orca/scripts
- From: richb svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3567 - in trunk: . src/orca/scripts
- Date: Tue, 12 Feb 2008 18:24:05 +0000 (GMT)
Author: richb
Date: Tue Feb 12 18:24:05 2008
New Revision: 3567
URL: http://svn.gnome.org/viewvc/orca?rev=3567&view=rev
Log:
* src/orca/scripts/planner.py:
Fix for bug #419136 â Planner toggle button in main window not
accessible.
Modified:
trunk/ChangeLog
trunk/src/orca/scripts/planner.py
Modified: trunk/src/orca/scripts/planner.py
==============================================================================
--- trunk/src/orca/scripts/planner.py (original)
+++ trunk/src/orca/scripts/planner.py Tue Feb 12 18:24:05 2008
@@ -74,26 +74,6 @@
if self._script.isDesiredFocusedItem(obj, roleList) and not obj.name:
text += _("Display more options")
- # Second special case is each one of the four graphics toggle
- # buttons in the main window Application should implement an
- # accessible relationship between the button and the label,
- # but until this is made we append for each one the button the
- # label that should be associated and its state (checked or
- # not)
- #
- rolesList = [pyatspi.ROLE_TOGGLE_BUTTON, \
- pyatspi.ROLE_FILLER, \
- pyatspi.ROLE_FILLER, \
- pyatspi.ROLE_PANEL, \
- pyatspi.ROLE_PANEL]
- if self._script.isDesiredFocusedItem(obj, rolesList):
- debug.println(debug.LEVEL_FINEST,
- "planner.onFocus - main window: " \
- + "one of the four graphic toggle buttons.")
- filler = obj.parent
- allLabels = self._script.findByRole(filler, pyatspi.ROLE_LABEL)
- text += allLabels[0].name
-
text = self._script.appendString(text, self._getTextForRole(obj))
if obj.getState().contains(pyatspi.STATE_CHECKED):
@@ -102,10 +82,9 @@
brailleindicatorindex = 0
regions = []
- componentRegion = braille.Component(
- obj, text,
- indicator=\
+ indicator=\
settings.brailleRadioButtonIndicators[brailleindicatorindex])
+ componentRegion = braille.Component(obj, text, indicator)
regions.append(componentRegion)
return [regions, componentRegion]
@@ -154,41 +133,6 @@
return utterances
- # Application should implement an accessible relationship
- # between the button and the label, but until this is made we
- # append for each one the button the label that should be
- # associated and its state (checked or not)
- #
- roleList = [pyatspi.ROLE_TOGGLE_BUTTON, \
- pyatspi.ROLE_FILLER, \
- pyatspi.ROLE_FILLER, \
- pyatspi.ROLE_PANEL, \
- pyatspi.ROLE_PANEL]
-
- if self._script.isDesiredFocusedItem(obj, roleList):
- debug.println(debug.LEVEL_FINEST,
- "planner.onFocus - main window: " \
- + "one of the four graphic toggle buttons.")
- if not already_focused:
- filler = obj.parent
- allLabels = self._script.findByRole(filler, pyatspi.ROLE_LABEL)
- tmp.append(allLabels[0].name)
- tmp.extend(self._getDefaultSpeech(obj, already_focused))
- if obj.getState().contains(pyatspi.STATE_CHECKED):
- tmp.append(_("pressed"))
- else:
- tmp.append(_("not pressed"))
-
- utterances.extend(tmp)
- utterances.extend(self._getSpeechForObjectAvailability(obj))
- else:
- if obj.getState().contains(pyatspi.STATE_CHECKED):
- utterances.append(_("pressed"))
- else:
- utterances.append(_("not pressed"))
-
- return utterances
-
return self._getSpeechForLabel(obj, already_focused)
########################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]