[orca] Don't treat dynamic skip links as if they are on the same line



commit d27ae99895d6acf709cc789b17a39724b4117ed1
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Feb 13 19:54:56 2020 +0100

    Don't treat dynamic skip links as if they are on the same line

 src/orca/scripts/web/script_utilities.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 87ce01799..8a986a211 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1536,8 +1536,12 @@ class Utilities(script_utilities.Utilities):
             if xStart == xEnd:
                 return False
 
-            if self.isLandmark(obj) and self.isLandmark(xObj) and obj != xObj:
-                return False
+            if obj != xObj:
+                if self.isLandmark(obj) and self.isLandmark(xObj):
+                    return False
+                if self.isLink(obj) and self.isLink(xObj) and self.intersectingRegion(xObj, obj):
+                    # This happens with dynamic skip links such as found on Wikipedia.
+                    return False
 
             if self.isBlockListDescendant(obj) != self.isBlockListDescendant(xObj):
                 return False


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