[orca/gnome-42] Web: Return early if candidate "fake placeholder" is editable
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-42] Web: Return early if candidate "fake placeholder" is editable
- Date: Wed, 4 May 2022 09:29:47 +0000 (UTC)
commit e7794b1ff457d0d33a5f5d6303d071947bd5f080
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 d1fb1dd5a..56c505721 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3785,6 +3785,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]