[orca] Chromium: Work around missing name-change events from page tabs



commit ea4cee224c2092928f9667f6d336a1cd17076381
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jan 8 11:22:33 2019 -0500

    Chromium: Work around missing name-change events from page tabs

 src/orca/scripts/toolkits/Chromium/script.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script.py b/src/orca/scripts/toolkits/Chromium/script.py
index 370aaa027..632caf75d 100644
--- a/src/orca/scripts/toolkits/Chromium/script.py
+++ b/src/orca/scripts/toolkits/Chromium/script.py
@@ -271,6 +271,14 @@ class Script(web.Script):
     def onSelectedChanged(self, event):
         """Callback for object:state-changed:selected accessibility events."""
 
+        if event.source.getRole() == pyatspi.ROLE_PAGE_TAB and event.detail1:
+            oldName = event.source.name
+            event.source.clearCache()
+            newName = event.source.name
+            if oldName != newName:
+                msg = "CHROMIUM: NO NAME CHANGE HACK: (name should be: '%s')" % newName
+                debug.println(debug.LEVEL_INFO, msg, True)
+
         # Other apps and toolkits implement the selection interface, which is
         # what we use to present active-descendanty selection changes, leaving
         # state-changed:selected for notifications related to toggling the


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