[orca] Work around Qt failing to use correct role and/or state
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Work around Qt failing to use correct role and/or state
- Date: Mon, 27 Apr 2020 14:49:58 +0000 (UTC)
commit fa7afa3c6700db1e31dfc457ece1a1ecf8e25690
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Apr 27 10:45:47 2020 -0400
Work around Qt failing to use correct role and/or state
Checkable menu items should have STATE_CHECKABLE and/or the role of
ROLE_CHECK_MENU_ITEM. Apparently this is not always the case for Qt
apps. This workaround should cause Orca to announce the checked state
when present, but not announce "not checked." In order for the latter
to occur, Qt apps should fix the aforementioned bug.
src/orca/generator.py | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index d926b8522..203e626a7 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -661,6 +661,9 @@ class Generator:
or obj.getRole() == pyatspi.ROLE_CHECK_MENU_ITEM:
return self._generateCheckedState(obj, **args)
+ if obj.getState().contains(pyatspi.STATE_CHECKED):
+ return self._generateCheckedState(obj, **args)
+
return []
def _generateMenuItemCheckedState(self, obj, **args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]