orca r3579 - in trunk: . src/orca
- From: shaeger svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3579 - in trunk: . src/orca
- Date: Thu, 14 Feb 2008 17:17:58 +0000 (GMT)
Author: shaeger
Date: Thu Feb 14 17:17:57 2008
New Revision: 3579
URL: http://svn.gnome.org/viewvc/orca?rev=3579&view=rev
Log:
Fixed bug #515263, ARIA tooltips should respect presentToolTips setting.
Modified:
trunk/ChangeLog
trunk/src/orca/Gecko.py
Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py (original)
+++ trunk/src/orca/Gecko.py Thu Feb 14 17:17:57 2008
@@ -5215,20 +5215,6 @@
def _getAttrDictionary(self, obj):
return dict([attr.split(':', 1) for attr in obj.getAttributes()])
- def isAriaAlert(self, obj):
- """Returns True if the given object is an ARIA wairole:alert or
- wairole:tooltip.
- """
- if obj is None:
- return False
- attrs = obj.getAttributes()
- if attrs is None:
- return False
- for attr in attrs:
- if attr == 'xml-roles:alert' or attr == 'xml-roles:tooltip':
- return True
- return False
-
def handleAsLiveRegion(self, event):
"""Returns True if the given event (object:children-changed, object:
text-insert only) should be considered a live region event"""
@@ -5256,7 +5242,7 @@
return False
# Now we need to look at the object attributes
- attrs = self._getAttrDictionary(event.source)
+ attrs = self._getAttrDictionary(event.any_data)
# Good live region markup
if attrs.has_key('container-live'):
return True
@@ -5265,10 +5251,16 @@
if attrs.has_key('tag') and attrs['tag'] == 'xul:richlistbox':
return False
- # This eliminates all ARIA widgets that are not considered live
- if attrs.has_key('xml-roles') \
- and attrs['xml-roles'] != 'alert':
- return False
+ if attrs.has_key('xml-roles'):
+ # This eliminates all ARIA widgets that are not
+ # considered live
+ if attrs['xml-roles'] != 'alert' \
+ and attrs['xml-roles'] != 'tooltip':
+ return False
+ # Only present tooltips when user wants them presented
+ elif attrs['xml-roles'] == 'tooltip' \
+ and not settings.presentToolTips:
+ return False
else:
# Some alerts have been seen without the :system postfix.
# We will take care of them separately.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]