[orca] Web: Return early if candidate "fake placeholder" is editable



commit 5e4c5c9c90125895b154ff78245500933ffb219b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon May 2 14:25:15 2022 +0200

    Web: Return early if candidate "fake placeholder" is editable
    
    When authors use a div or span to create a placeholder-like experience
    for a contenteditable entry, that div or span should lack the "editable"
    state. We can use that check to improve performance in large content-
    editable elements such as rich text editors.

 src/orca/scripts/web/script_utilities.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index e4825fcb0..83c8081ed 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3788,6 +3788,9 @@ class Utilities(script_utilities.Utilities):
         if not (obj and self.inDocumentContent(obj) and obj.parent):
             return False
 
+        if obj.getState().contains(pyatspi.STATE_EDITABLE):
+            return False
+
         entry = pyatspi.findAncestor(obj, lambda x: x and x.getRole() == pyatspi.ROLE_ENTRY)
         if not (entry and entry.name):
             return False


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