[orca] Skip over clickable images during line nav if the author has set alt to ""



commit 0a3a1972fae193d013d5deeb5eb29582306ad973
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jun 9 14:47:51 2020 -0400

    Skip over clickable images during line nav if the author has set alt to ""
    
    The user agent should prune these from the accessibility tree, but since
    they don't....

 src/orca/scripts/web/script_utilities.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 3792f4274..d93b33723 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3766,9 +3766,9 @@ class Utilities(script_utilities.Utilities):
         if obj.getRole() not in [pyatspi.ROLE_IMAGE, pyatspi.ROLE_CANVAS] \
            and self._getTag(obj) != 'svg':
             rv = False
-        if rv and (obj.name or obj.description):
+        if rv and (obj.name or obj.description or self.hasLongDesc(obj)):
             rv = False
-        if rv and (self.isClickableElement(obj) or self.hasLongDesc(obj)):
+        if rv and (self.isClickableElement(obj) and not self.hasExplicitName(obj)):
             rv = False
         if rv and obj.getState().contains(pyatspi.STATE_FOCUSABLE):
             rv = False


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