[orca] Adjust workaround for finding a name for nameless checkboxes
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Adjust workaround for finding a name for nameless checkboxes
- Date: Tue, 8 Dec 2020 09:42:32 +0000 (UTC)
commit b81bfba41288b22cfb4bbe97293ca0123029a175
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Dec 8 10:40:15 2020 +0100
Adjust workaround for finding a name for nameless checkboxes
The fallback in the web code was preventing other fallbacks from
doing their thing.
src/orca/scripts/web/braille_generator.py | 3 ++-
src/orca/scripts/web/speech_generator.py | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/braille_generator.py b/src/orca/scripts/web/braille_generator.py
index de5bdf243..07a548fb6 100644
--- a/src/orca/scripts/web/braille_generator.py
+++ b/src/orca/scripts/web/braille_generator.py
@@ -174,7 +174,8 @@ class BrailleGenerator(braille_generator.BrailleGenerator):
result[0] = result[0].strip()
elif not result and obj.getRole() == pyatspi.ROLE_CHECK_BOX:
gridCell = pyatspi.findAncestor(obj, self._script.utilities.isGridCell)
- return super()._generateName(gridCell, **args)
+ if gridCell:
+ return super()._generateName(gridCell, **args)
return result
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 6db32653d..2b5c242b8 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -346,7 +346,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
if obj.getRole() == pyatspi.ROLE_CHECK_BOX:
gridCell = pyatspi.findAncestor(obj, self._script.utilities.isGridCell)
- return super()._generateLabelOrName(gridCell, **args)
+ if gridCell:
+ return super()._generateLabelOrName(gridCell, **args)
return super()._generateLabelOrName(obj, **args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]