[orca] Try to improve filtering out of redundant names
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Try to improve filtering out of redundant names
- Date: Wed, 29 Jan 2020 17:09:43 +0000 (UTC)
commit cb7e1a07437ceb4f888d5a3fc1adfa1a7f63c644
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Wed Jan 29 12:06:16 2020 -0500
Try to improve filtering out of redundant names
We're seeing instances where the name is a subset of the label:
* label: "Leading space:" name: "Leading space"
* name: "Stacking order (Z)" name: "Stacking order"
In this instance, when generating the label and name for the widget,
we don't want to append the name to the label. Therefore if the label
text starts with the name text, don't append the name.
src/orca/generator.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 67d44ade7..4f3654609 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -381,7 +381,8 @@ class Generator:
result.extend(label)
if not len(label):
result.extend(name)
- elif len(name) and name[0].split() != label[0].split():
+ elif len(name) and name[0].split() != label[0].split() \
+ and not label[0].startswith(name[0]):
result.extend(name)
return result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]