[orca] Only treat expandable elements as focus mode widgets if focusable



commit a57f32b644d58f8315c92c09b476b2fd254443d2
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Tue Jan 21 09:21:08 2020 -0500

    Only treat expandable elements as focus mode widgets if focusable
    
    Authors are putting aria-expanded on non-widgets. This is no longer
    supported in ARIA, but Firefox does not keep itself up-to-date with
    what's going on in ARIA.

 src/orca/scripts/web/script_utilities.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 9971d83f3..213e43f74 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1859,8 +1859,10 @@ class Utilities(script_utilities.Utilities):
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
-        if state.contains(pyatspi.STATE_EDITABLE) \
-           or state.contains(pyatspi.STATE_EXPANDABLE):
+        if state.contains(pyatspi.STATE_EDITABLE):
+            return True
+
+        if state.contains(pyatspi.STATE_EXPANDABLE) and state.contains(pyatspi.STATE_FOCUSABLE):
             return True
 
         alwaysFocusModeRoles = [pyatspi.ROLE_COMBO_BOX,


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