[orca] Refine label inference for radio buttons



commit daf1e54ec0231c66e68147173c90fe2d13e68934
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun Jan 6 18:31:01 2013 -0500

    Refine label inference for radio buttons

 src/orca/label_inference.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/label_inference.py b/src/orca/label_inference.py
index ed3f455..df0aa6f 100644
--- a/src/orca/label_inference.py
+++ b/src/orca/label_inference.py
@@ -360,9 +360,12 @@ class LabelInference:
             index = len(contents)
 
         onRight = contents[min(len(contents), index+1):]
-        for item in onRight:
+        for i, item in enumerate(onRight):
             if self._isWidget(item[0]):
-                return None
+                if not self._preferRight(obj):
+                    return None
+                onRight = onRight[0:i]
+                break
 
         if not (onRight and onRight[0]):
             return None



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