[orca/gnome-42] Web: Don't treat DOCUMENT_FRAME as a stop-at role for generating ancestors



commit f5ce43c958388e6178e5d7994ab2fcac6348ce7e
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Jun 16 10:49:02 2022 +0200

    Web: Don't treat DOCUMENT_FRAME as a stop-at role for generating ancestors
    
    When generating ancestors, we typically stop at large containers so as
    not to be too chatty. We were treating DOCUMENT_FRAME as such a container,
    primarily because it was how web documents were exposed to us (prior to
    the creation of DOCUMENT_WEB). Now that we have DOCUMENT_WEB, we should
    be able to distinguish ARIA's document role (DOCUMENT_FRAME), from a web
    document. And because we cannot control where an author might choose to
    use this role, we should not take it as a reason to stop generating
    ancestors. Example: The FluentUI react dialog applies the document
    role to a div which stands between the buttons and the dialog.
    
    Fixes issue 250

 src/orca/scripts/web/speech_generator.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index d2981096f..baea77854 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -87,8 +87,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
            or obj.getRole() in [pyatspi.ROLE_TOOL_TIP, pyatspi.ROLE_STATUS_BAR]:
             return result
 
-        args['stopAtRoles'] = [pyatspi.ROLE_DOCUMENT_FRAME,
-                               pyatspi.ROLE_DOCUMENT_WEB,
+        args['stopAtRoles'] = [pyatspi.ROLE_DOCUMENT_WEB,
                                pyatspi.ROLE_EMBEDDED,
                                pyatspi.ROLE_INTERNAL_FRAME,
                                pyatspi.ROLE_MATH,


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