[orca] Treat childless editable combobox inputs as a text field
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Treat childless editable combobox inputs as a text field
- Date: Mon, 28 Oct 2019 21:57:58 +0000 (UTC)
commit e1f36978222b2ab097a035b0c8e96ff9e91cd509
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Oct 28 17:56:56 2019 -0400
Treat childless editable combobox inputs as a text field
src/orca/scripts/web/script_utilities.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 60a36e0fd..23a1ee894 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -704,9 +704,25 @@ class Utilities(script_utilities.Utilities):
return rv
def isTextArea(self, obj):
+ if not self.inDocumentContent(obj):
+ return super().isTextArea(obj)
+
if self.isLink(obj):
return False
+ try:
+ role = obj.getRole()
+ state = obj.getState()
+ except:
+ msg = "WEB: Exception getting role and state for %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ if role == pyatspi.ROLE_COMBO_BOX \
+ and state.contains(pyatspi.STATE_EDITABLE) \
+ and not obj.childCount:
+ return True
+
return super().isTextArea(obj)
def isReadOnlyTextArea(self, obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]