[orca] Web: Check for sizeless headings when building line contents
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Check for sizeless headings when building line contents
- Date: Thu, 11 Nov 2021 15:17:20 +0000 (UTC)
commit 6cffaac3886f6a3193a2717f3d914b6c8741b553
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Nov 11 16:09:03 2021 +0100
Web: Check for sizeless headings when building line contents
Normally we want to present visual line contents in layout mode.
But we include unrendered, sizeless objects on the same line
because they are presumably there for accessibility purposes and we
don't want their inclusion to break up the rest of the line. There is
at least one site including an unrendered, sizeless heading right
before the content. We should treat that heading, and those like it,
as the full line.
src/orca/scripts/web/script_utilities.py | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index c2e065af2..345423eef 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1788,6 +1788,10 @@ class Utilities(script_utilities.Utilities):
elif obj.getRole() in [pyatspi.ROLE_TREE, pyatspi.ROLE_TREE_ITEM] \
and xObj.getRole() in [pyatspi.ROLE_TREE, pyatspi.ROLE_TREE_ITEM]:
return False
+ elif obj.getRole() == pyatspi.ROLE_HEADING and self.hasNoSize(obj):
+ return False
+ elif xObj.getRole() == pyatspi.ROLE_HEADING and self.hasNoSize(xObj):
+ return False
if self.isMathTopLevel(xObj) or self.isMath(obj):
onSameLine = self.extentsAreOnSameLine(extents, xExtents, extents[3])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]