[orca] Chromium: Improve presentation of page changes in PDF viewer
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Improve presentation of page changes in PDF viewer
- Date: Mon, 12 Aug 2019 22:07:55 +0000 (UTC)
commit 6308e0d97ec422aeb3ba2ff8d25031a264d3c15b
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Aug 12 18:07:10 2019 -0400
Chromium: Improve presentation of page changes in PDF viewer
src/orca/generator.py | 2 ++
src/orca/script_utilities.py | 3 +++
src/orca/scripts/web/script_utilities.py | 4 ++++
src/orca/speech_generator.py | 2 ++
src/orca/structural_navigation.py | 1 +
5 files changed, 12 insertions(+)
---
diff --git a/src/orca/generator.py b/src/orca/generator.py
index c9d19283d..eac846dc2 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -1374,6 +1374,8 @@ class Generator:
return object_properties.ROLE_SUBTITLE
if self._script.utilities.isLandmark(obj):
+ if self._script.utilities.isLandmarkWithoutType(obj):
+ return ''
if self._script.utilities.isLandmarkBanner(obj):
return object_properties.ROLE_LANDMARK_BANNER
if self._script.utilities.isLandmarkComplementary(obj):
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index f892949ff..b61b52e7d 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -887,6 +887,9 @@ class Utilities:
def isLandmark(self, obj):
return False
+ def isLandmarkWithoutType(self, obj):
+ return False
+
def isLandmarkBanner(self, obj):
return False
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index a7be9767f..e465cc9a8 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3240,6 +3240,10 @@ class Utilities(script_utilities.Utilities):
self._isLandmark[hash(obj)] = rv
return rv
+ def isLandmarkWithoutType(self, obj):
+ roles = self._getXMLRoles(obj)
+ return not roles
+
def isLandmarkBanner(self, obj):
return 'banner' in self._getXMLRoles(obj)
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 4d7bfc9aa..156d7eb13 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1710,6 +1710,8 @@ class SpeechGenerator(generator.Generator):
result.append(messages.LEAVING_LANDMARK_SEARCH)
elif self._script.utilities.isLandmarkForm(obj):
result.append(messages.LEAVING_FORM)
+ else:
+ result = ['']
elif role == pyatspi.ROLE_FORM:
result.append(messages.LEAVING_FORM)
else:
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index d1d9b3867..0b357a4ec 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -2278,6 +2278,7 @@ class StructuralNavigation:
if obj:
[obj, characterOffset] = self._getCaretPosition(obj)
self._setCaretPosition(obj, characterOffset)
+ self._script.presentMessage(obj.name)
self._presentLine(obj, characterOffset)
else:
full = messages.NO_LANDMARK_FOUND
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]