[orca] Add explicit handling for "document web" role



commit 9f2a07671fb5fbd0bc0e1b06fb818d641720ff7d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue May 15 08:16:45 2018 -0400

    Add explicit handling for "document web" role

 src/orca/formatting.py                   |    5 +++++
 src/orca/scripts/web/speech_generator.py |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index d5902c4..3da28ea 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -190,6 +190,11 @@ formatting = {
             'basicWhereAmI': 'label + readOnly + textRole + textContent + anyTextSelection + ' + MNEMONIC,
             'detailedWhereAmI': 'label + readOnly + textRole + textContentWithAttributes + anyTextSelection 
+ ' + MNEMONIC
             },
+        pyatspi.ROLE_DOCUMENT_WEB: {
+            'unfocused': 'label + readOnly + textRole + currentLineText + anyTextSelection + ' + MNEMONIC,
+            'basicWhereAmI': 'label + readOnly + textRole + textContent + anyTextSelection + ' + MNEMONIC,
+            'detailedWhereAmI': 'label + readOnly + textRole + textContentWithAttributes + anyTextSelection 
+ ' + MNEMONIC
+            },
         'ROLE_DPUB_LANDMARK': {
             'focused': 'leaving or labelOrName',
             'unfocused': 'labelOrName + currentLineText + allTextSelection'
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 791175d..b1973c8 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -303,6 +303,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                 doNotSpeak.append(pyatspi.ROLE_LIST)
             if (start or end):
                 doNotSpeak.append(pyatspi.ROLE_DOCUMENT_FRAME)
+                doNotSpeak.append(pyatspi.ROLE_DOCUMENT_WEB)
                 doNotSpeak.append(pyatspi.ROLE_ALERT)
             if self._script.utilities.isAnchor(obj):
                 doNotSpeak.append(obj.getRole())


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