[orca] Do not try to infer labels from widgets deeply buried in table cells



commit f7b5b549ada07a6878446b1097dcc1e5d18cec5c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Dec 20 19:20:42 2012 +0100

    Do not try to infer labels from widgets deeply buried in table cells

 src/orca/label_inference.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/label_inference.py b/src/orca/label_inference.py
index 5aaf3a2..bd14c3b 100644
--- a/src/orca/label_inference.py
+++ b/src/orca/label_inference.py
@@ -443,6 +443,9 @@ class LabelInference:
         if not self._isSimpleObject(cell):
             return None
 
+        if not cell in [obj.parent, obj.parent.parent]:
+            return None
+
         pred = lambda x: x.getRole() == pyatspi.ROLE_TABLE
         grid = pyatspi.utils.findAncestor(cell, pred)
         if not grid:



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