[orca] Only treat block list descendants on different lines if they are not links



commit a15b68100451ce2b8dbb09935e6e6127ae6a23e9
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Feb 17 21:59:48 2020 +0100

    Only treat block list descendants on different lines if they are not links
    
    The goal of treating block list descendants on different lines is to keep
    text blocks from being presented on the same line when functionally they
    are not (e.g. a heading on the same line as the start of a list). If
    we have a set of links in a list, even if the list items report display:
    block, we want to let the bounding boxes determine whether or not to
    treat them as if they are on the same line.

 src/orca/scripts/web/script_utilities.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 6a5454df9..e2c4a2302 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1561,9 +1561,8 @@ class Utilities(script_utilities.Utilities):
                     if abs(extents[0] - xExtents[0]) <= 1 and abs(extents[1] - xExtents[1]) <= 1:
                         # This happens with dynamic skip links such as found on Wikipedia.
                         return False
-
-            if self.isBlockListDescendant(obj) != self.isBlockListDescendant(xObj):
-                return False
+                elif self.isBlockListDescendant(obj) != self.isBlockListDescendant(xObj):
+                    return False
 
             if self.isMathTopLevel(xObj) or self.isMath(obj):
                 onSameLine = self.extentsAreOnSameLine(extents, xExtents, extents[3])


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