Skip to content

Commit 367e7a5

Browse files
authored
Merge 0dd2100 into 0c5be4f
2 parents 0c5be4f + 0dd2100 commit 367e7a5

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

source/NVDAObjects/IAccessible/__init__.py

Lines changed: 17 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
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -1348,8 +1348,23 @@ 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]
13511352
try:
1352-
text = headers[i].QueryInterface(IA2.IAccessible2).accName(0)
1353+
headerIA2Ptr = header.QueryInterface(IA2.IAccessible2)
1354+
except COMError:
1355+
log.debugWarning("could not get IAccessible2 pointer for table header", exc_info=True)
1356+
continue
1357+
# Chromium exposes cells as their own headers, so exclude cells with the same `Iaccessible2::uniqueID`.
1358+
if self.IA2UniqueID is not None: # No point checking if we don't have this cell's UID
1359+
try:
1360+
headerUniqueID = headerIA2Ptr.uniqueID
1361+
except COMError:
1362+
log.debugWarning("could not get IAccessible2::uniqueID to use as headerUniqueID", exc_info=True)
1363+
headerUniqueID = None
1364+
if self.IA2UniqueID == headerUniqueID:
1365+
continue
1366+
try:
1367+
text = headerIA2Ptr.accName(0)
13531368
except COMError:
13541369
continue
13551370
if not text:

source/compoundDocuments.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
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-2024 NV Access Limited, Bram Duvigneau
5+
56
from typing import (
67
Optional,
78
Dict,
@@ -172,6 +173,8 @@ def _getControlFieldForObject(self, obj: NVDAObject, ignoreEditableText=True):
172173
field["table-id"] = 1 # FIXME
173174
field["table-rownumber"] = obj.rowNumber
174175
field["table-columnnumber"] = obj.columnNumber
176+
field["table-rowheadertext"] = obj.rowHeaderText
177+
field["table-columnheadertext"] = obj.columnHeaderText
175178
# Row/column span is not supported by all implementations (e.g. LibreOffice)
176179
try:
177180
field['table-rowsspanned']=obj.rowSpan

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ What's New in NVDA
66
= 2024.2 =
77

88
== New Features ==
9+
- Reporting row and column headers is now supported in contenteditable HTML elements. (#14113)
910
- 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)
1011
- Added support for the BrailleEdgeS2 braille device. (#16033)
1112
-

0 commit comments

Comments
 (0)