[orca] Fallback on access key when there is no aria-keyshortcuts value



commit 20bc5e2a209b1d09db0726894efb7fb081111c3b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Oct 30 15:33:45 2018 +0100

    Fallback on access key when there is no aria-keyshortcuts value

 src/orca/scripts/web/script_utilities.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 1c08d6987..35d02db78 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1704,7 +1704,11 @@ class Utilities(script_utilities.Utilities):
 
         keys = map(lambda x: x.replace("+", " "), attrs.get("keyshortcuts", "").split(" "))
         keys = map(lambda x: x.replace(" ", "+"), map(self.labelFromKeySequence, keys))
-        return ["", " ".join(keys), ""]
+        rv = ["", " ".join(keys), ""]
+        if list(filter(lambda x: x, rv)):
+            return rv
+
+        return super().mnemonicShortcutAccelerator(obj)
 
     def unrelatedLabels(self, root, onlyShowing=True, minimumWords=3):
         if not (root and self.inDocumentContent(root)):


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