[orca] Include aria-details information in whereAmI presentation
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Include aria-details information in whereAmI presentation
- Date: Thu, 27 Feb 2020 12:22:57 +0000 (UTC)
commit a8bbb26b01e353d9bcd3ee28b702df54d88fe4a6
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Feb 27 13:22:01 2020 +0100
Include aria-details information in whereAmI presentation
src/orca/formatting.py | 4 ++--
src/orca/generator.py | 3 +++
src/orca/scripts/web/speech_generator.py | 27 +++++++++++++++++++++++++++
src/orca/speech_generator.py | 10 ++++++++++
4 files changed, 42 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index be3f54917..22ce285e5 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -119,8 +119,8 @@ formatting = {
'suffix': {
'focused': '[]',
'unfocused': 'newNodeLevel + unselectedCell + clickable + pause + hasLongDesc + hasDetails +
detailsFor +' + TUTORIAL + ' + description + pause + hasPopup',
- 'basicWhereAmI': TUTORIAL + ' + clickable + hasLongDesc + description + pause + hasPopup',
- 'detailedWhereAmI': TUTORIAL + ' + clickable + hasLongDesc + description + pause + hasPopup'
+ 'basicWhereAmI': TUTORIAL + ' + clickable + hasLongDesc + description + pause + hasPopup + pause
+ detailsFor + pause + allDetails',
+ 'detailedWhereAmI': TUTORIAL + ' + clickable + hasLongDesc + description + pause + hasPopup +
detailsFor + pause + allDetails'
},
'default': {
'focused': '[]',
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 254d82743..fc529864a 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -497,6 +497,9 @@ class Generator:
def _generateDetailsFor(self, obj, **args):
return []
+ def _generateAllDetails(self, obj, **args):
+ return []
+
def _generateHasPopup(self, obj, **args):
return []
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 1b29963d7..4f654ddae 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -238,6 +238,33 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
result.extend(self.voice(speech_generator.SYSTEM))
return result
+ def _generateAllDetails(self, obj, **args):
+ if _settingsManager.getSetting('onlySpeakDisplayedText'):
+ return []
+
+ objs = self._script.utilities.detailsIn(obj)
+ if not objs:
+ return []
+
+ args['stringType'] = 'hasdetails'
+ result = [self._script.formatting.getString(**args) % ""]
+ result.extend(self.voice(speech_generator.SYSTEM))
+
+ result = []
+ for o in objs:
+ result.append(self.getLocalizedRoleName(o))
+ result.extend(self.voice(speech_generator.SYSTEM))
+
+ string = self._script.utilities.expandEOCs(o)
+ if not string.strip():
+ continue
+
+ result.append(string)
+ result.extend(self.voice(speech_generator.DEFAULT))
+ result.extend(self._generatePause(o))
+
+ return result
+
def _generateDetailsFor(self, obj, **args):
if _settingsManager.getSetting('onlySpeakDisplayedText'):
return []
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index a8cad576c..4474b2307 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -306,6 +306,16 @@ class SpeechGenerator(generator.Generator):
result.extend(acss)
return result
+ def _generateAllDetails(self, obj, **args):
+ if _settingsManager.getSetting('onlySpeakDisplayedText'):
+ return []
+
+ acss = self.voice(SYSTEM)
+ result = generator.Generator._generateAllDetails(self, obj, **args)
+ if result:
+ result.extend(acss)
+ return result
+
def _generateDeletionStart(self, obj, **args):
if _settingsManager.getSetting('onlySpeakDisplayedText'):
return []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]