Skip to content

Commit e45c984

Browse files
authored
Merge 65b491e into a3a5fbb
2 parents a3a5fbb + 65b491e commit e45c984

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

source/NVDAObjects/IAccessible/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2006-2023 NV Access Limited, Babbage B.V., Cyrille Bougot
2+
# Copyright (C) 2006-2024 NV Access Limited, Babbage B.V., Cyrille Bougot, Sascha Cowley
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -1348,8 +1348,18 @@ def _tableHeaderTextHelper(self, axis):
13481348
# Each header must be fetched from the headers array once and only once,
13491349
# as it gets released when it gets garbage collected.
13501350
for i in range(nHeaders):
1351+
header = headers[i]
1352+
# Chromium exposes cells as their own headers, so exclude cells with the same `Iaccessible2::uniqueID`.
1353+
if self.IA2UniqueID is not None: # No point checking if we don't have this cell's UID
1354+
try:
1355+
headerUniqueID = header.QueryInterface(IA2.IAccessible2).uniqueID
1356+
except COMError:
1357+
log.debugWarning("could not get IAccessible2::uniqueID to use as headerUniqueID",exc_info=True)
1358+
headerUniqueID = None
1359+
if self.IA2UniqueID == headerUniqueID:
1360+
continue
13511361
try:
1352-
text = headers[i].QueryInterface(IA2.IAccessible2).accName(0)
1362+
text = header.QueryInterface(IA2.IAccessible2).accName(0)
13531363
except COMError:
13541364
continue
13551365
if not text:

source/compoundDocuments.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# A part of NonVisual Desktop Access (NVDA)
22
# This file is covered by the GNU General Public License.
33
# See the file COPYING for more details.
4-
# Copyright (C) 2010-2022 NV Access Limited, Bram Duvigneau
4+
# Copyright (C) 2010-2023 NV Access Limited, Bram Duvigneau, Sascha Cowley
55
from typing import (
66
Optional,
77
Dict,
@@ -172,6 +172,8 @@ def _getControlFieldForObject(self, obj: NVDAObject, ignoreEditableText=True):
172172
field["table-id"] = 1 # FIXME
173173
field["table-rownumber"] = obj.rowNumber
174174
field["table-columnnumber"] = obj.columnNumber
175+
field["table-rowheadertext"] = obj.rowHeaderText
176+
field["table-columnheadertext"] = obj.columnHeaderText
175177
# Row/column span is not supported by all implementations (e.g. LibreOffice)
176178
try:
177179
field['table-rowsspanned']=obj.rowSpan

user_docs/en/changes.t2t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ What's New in NVDA
66
= 2024.2 =
77

88
== New Features ==
9+
10+
- Reporting row and column headers is now supported in contenteditable HTML elements. (#14113)
911
- In Windows 11, NVDA will announce alerts from voice typing and suggested actions including the top suggestion when copying data such as phone numbers to the clipboard (Windows 11 2022 Update and later). (#16009, @josephsl)
1012
-
1113

1214

15+
1316
== Changes ==
1417

1518

0 commit comments

Comments
 (0)