[orca] Only treat list items as widgets if they are not inside a list parent



commit 97cbd3ee401b8722c1aa46bb6eded081b33d83d8
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 2 17:09:42 2020 +0100

    Only treat list items as widgets if they are not inside a list parent
    
    We used to do other things rather than check the parent role because user
    agents were mistakenly using the list role for listbox as well as for list.
    This fixes our treating editable list items as widgets rather than text.

 src/orca/scripts/web/script_utilities.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 3c57b5252..70a9394a0 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -907,7 +907,9 @@ class Utilities(script_utilities.Utilities):
         role = obj.getRole()
         if role in roles:
             rv = True
-        elif role in [pyatspi.ROLE_LIST_ITEM, pyatspi.ROLE_TABLE_CELL]:
+        elif role == pyatspi.ROLE_LIST_ITEM:
+            rv = obj.parent.getRole() != pyatspi.ROLE_LIST
+        elif role == pyatspi.ROLE_TABLE_CELL:
             rv = not self.isTextBlockElement(obj)
 
         self._isNonEntryTextWidget[hash(obj)] = rv


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]