Skip to content

Announcement of row/column headers to braille display #4195

@nvaccessAuto

Description

@nvaccessAuto

Reported by nishimotz on 2014-06-13 10:22
Attached patch (as well as shown below) enables to include row/column headers in braille display if format information setting 'Table row/column headers' is checked.

Tested with Windows 7 and Excel 2010 (NVDA+shift+c/r).

diff --git a/source/braille.py b/source/braille.py
index 6971d81..58ec12c 100644
--- a/source/braille.py
+++ b/source/braille.py
@@ -492,15 +492,18 @@ def getBrailleTextForProperties(**propertyValues):
            # Translators: Displayed in braille when an object (e.g. a tree view item) has a hierarchical level.
            # %s is replaced with the level.
            textList.append(_('lv %s')%positionInfo[= propertyValues.get("rowHeaderText")
+   if rowHeaderText:
+       textList.append(rowHeaderText)
+   columnHeaderText = propertyValues.get("columnHeaderText")
+   if columnHeaderText:
+       textList.append(columnHeaderText)
    if rowNumber:
        if includeTableCellCoords and not cellCoordsText: 
            # Translators: Displayed in braille for a table cell row number.
            # %s is replaced with the row number.
            textList.append(_("r%s") % rowNumber)
    if columnNumber:
-       columnHeaderText = propertyValues.get("columnHeaderText")
-       if columnHeaderText:
-           textList.append(columnHeaderText)
        if includeTableCellCoords and not cellCoordsText:
            # Translators: Displayed in braille for a table cell column number.
            # %s is replaced with the column number.
@@ -536,6 +539,8 @@ class NVDAObjectRegion(Region):
            keyboardShortcut=obj.keyboardShortcut if presConfig["reportKeyboardShortcuts"]('level'])
+   rowHeaderText) else None,
            positionInfo=obj.positionInfo if presConfig[else None,
            cellCoordsText=obj.cellCoordsText if config.conf["documentFormatting"]("reportObjectPositionInformation"])[else None,
+           columnHeaderText=obj.columnHeaderText if hasattr(obj, "columnHeaderText") and config.conf["documentFormatting"]("reportTableCellCoords"])[else None,
+           rowHeaderText=obj.rowHeaderText if hasattr(obj, "rowHeaderText") and config.conf["documentFormatting"]("reportTableHeaders"])["reportTableHeaders"] else None,
        )
        self.rawText = text + self.appendText
        super(NVDAObjectRegion, self).update()
-- 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions