Skip to content

Commit fd7192e

Browse files
authored
Merge 23015fd into f1c73d1
2 parents f1c73d1 + 23015fd commit fd7192e

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

source/NVDAObjects/UIA/wordDocument.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,3 +607,21 @@ def script_reportCurrentComment(self,gesture):
607607
# Translators: a message when there is no comment to report in Microsoft Word
608608
ui.message(_("No comments"))
609609
return
610+
611+
@script(gesture="kb:NVDA+shift+c")
612+
def script_setColumnHeader(self, gesture):
613+
ui.message(_(
614+
# Translators: The message reported in Microsoft Word for document types not supporting setting custom
615+
# headers.
616+
"Command not supported in this type of document. "
617+
"The tables have their first row cells automatically set as column headers."
618+
))
619+
620+
@script(gesture="kb:NVDA+shift+r")
621+
def script_setRowHeader(self, gesture):
622+
ui.message(_(
623+
# Translators: The message reported in Microsoft Word for document types not supporting setting custom
624+
# headers.
625+
"Command not supported in this type of document. "
626+
"The tables have their first column cells automatically set as row headers."
627+
))

user_docs/en/userGuide.t2t

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,11 @@ NVDA provides its own extra features for some applications to make certain task
11381138

11391139
+++ Automatic Column and Row Header Reading +++[WordAutomaticColumnAndRowHeaderReading]
11401140
NVDA is able to automatically announce appropriate row and column headers when navigating around tables in Microsoft Word.
1141-
This firstly requires that the Report Table row / column headers option in NVDA's Document Formatting settings, found in the [NVDA Settings #NVDASettings] dialog, be turned on.
1142-
Secondly, NVDA needs to know which row or column contains the headers in any given table.
1141+
This requires that the Report Table row / column headers option in NVDA's Document Formatting settings, found in the [NVDA Settings #NVDASettings] dialog, be turned on.
1142+
1143+
If you use [UIA to access Word documents #MSWordUIA], that is, by default, in recent versions of Word and Windows, the cells of the first row will automatically be considered as column headers; similarly, the cells of the first column will automatically be considered as row headers;
1144+
1145+
On the contrary, if you do not use [UIA to access Word documents #MSWordUIA], you will have to indicate to NVDA which row or column contains the headers in any given table.
11431146
After moving to the first cell in the column or row containing the headers, use one of the following commands:
11441147
%kc:beginInclude
11451148
|| Name | Key | Description |

0 commit comments

Comments
 (0)