[orca/gnome-3-36] Convert list of details container role names into set
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-36] Convert list of details container role names into set
- Date: Wed, 26 Feb 2020 13:37:28 +0000 (UTC)
commit 23eb84e1f56baa2273b4a140e8f3b2b01ae66d44
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Feb 26 14:26:37 2020 +0100
Convert list of details container role names into set
If aria-details points to multiple targets with the same role, we want
to summarize that information rather than repeat roles. We cannot do that
without breaking string freeze, however. So for now, just list unique
role names.
src/orca/scripts/web/speech_generator.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 2ec9a1407..04b0b39f0 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -230,8 +230,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
if not objs:
return []
- objString = lambda x: "%s %s" % (x.name, self.getLocalizedRoleName(x))
- toPresent = ", ".join(list(map(objString, objs)))
+ objString = lambda x: str.strip("%s %s" % (x.name, self.getLocalizedRoleName(x)))
+ toPresent = ", ".join(set(map(objString, objs)))
args['stringType'] = 'hasdetails'
result = [self._script.formatting.getString(**args) % toPresent]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]