[orca] Use presentMessage rather than presentObject in onNameChanged
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Use presentMessage rather than presentObject in onNameChanged
- Date: Tue, 11 Oct 2022 08:35:36 +0000 (UTC)
commit 4f0ac427f4d6a5bbc156ca105b02bae613d55332
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Oct 11 10:32:17 2022 +0200
Use presentMessage rather than presentObject in onNameChanged
When we use presentObject, the formatting string usually includes
the label and/or name. But it does not for all roles, such as the
PUSH_BUTTON role. Using presentMessage with the event.any_data (if
present) is consistent with what we do for description changes and
will ensure the name change of the currently focused/active item
is spoken.
See issue #255.
src/orca/scripts/default.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 199cc1963..1e666b880 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2518,7 +2518,8 @@ class Script(script.Script):
names[hash(obj)] = event.any_data
self.pointOfReference['names'] = names
- self.presentObject(obj, alreadyFocused=True, interrupt=True)
+ if event.any_data:
+ self.presentMessage(event.any_data)
def onPressedChanged(self, event):
"""Callback for object:state-changed:pressed accessibility events."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]