office-gobmx/accessibility
Michael Weghorn bf15445b71 tdf#99609 tdf#156473 a11y: Check whether row header exists
Don't allow using `BBINDEX_ROWHEADERBAR` as the
child index unconditionally, but only if the
browse box actually has a row header.

An `AccessibleTabListBox` doesn't have a header
and instead returns the table when requesting the
child at index 1 (`BBINDEX_ROWHEADERBAR`).

Now that row headers are propagated to the Windows
platform accessibility layer with

    commit 2b30d37bd5
    Date:   Thu Aug 3 15:48:48 2023 +0100

        tdf#156473 wina11y: Fix invalid write due to row/col mismatch

in place, NVDA confusingly started announcing all cells
in the currently selected row as row headers for
the currently selected cell in the Expert Configuration
dialog, because of the table being returned without
this change in place (while the cells in that table don't
actually have any row headers).

Related backtrace of how the table was returned
for the row headers:

        1   accessibility::AccessibleTabListBox::getAccessibleChild          accessibletablistbox.cxx     90   0x7fffb8ab64bb
        2   accessibility::AccessibleBrowseBoxTable::implGetHeaderBar        AccessibleBrowseBoxTable.cxx 214  0x7fffb8a7e241
        3   accessibility::AccessibleBrowseBoxTable::getAccessibleRowHeaders AccessibleBrowseBoxTable.cxx 116  0x7fffb8a7da02
        4   QtAccessibleWidget::rowHeaderCells                               QtAccessibleWidget.cxx       1808 0x7fffe3e51e97
        5   AtSpiAdaptor::tableCellInterface                                 atspiadaptor.cpp             2801 0x7fffe2cee526
        6   AtSpiAdaptor::handleMessage                                      atspiadaptor.cpp             1450 0x7fffe2cde6ee
        7   QDBusConnectionPrivate::activateObject                           qdbusintegrator.cpp          1416 0x7fffe14cc216
        8   QDBusActivateObjectEvent::placeMetaCall                          qdbusintegrator.cpp          1572 0x7fffe14cceba
        9   QObject::event                                                   qobject.cpp                  1438 0x7fffe3621280
        10  QApplicationPrivate::notify_helper                               qapplication.cpp             3287 0x7fffe1ba2414
        11  QApplication::notify                                             qapplication.cpp             3238 0x7fffe1ba2224
        12  QCoreApplication::notifyInternal2                                qcoreapplication.cpp         1123 0x7fffe35a3c34
        13  QCoreApplication::sendEvent                                      qcoreapplication.cpp         1557 0x7fffe35a46f5
        14  QCoreApplicationPrivate::sendPostedEvents                        qcoreapplication.cpp         1924 0x7fffe35a55b2
        15  QCoreApplication::sendPostedEvents                               qcoreapplication.cpp         1781 0x7fffe35a4eba
        16  postEventSourceDispatch                                          qeventdispatcher_glib.cpp    240  0x7fffe39b26d3
        17  ??                                                                                                 0x7fffe97135b4
        18  ??                                                                                                 0x7fffe9716607
        19  g_main_context_iteration                                                                           0x7fffe9716bfc
        20  QEventDispatcherGlib::processEvents                              qeventdispatcher_glib.cpp    390  0x7fffe39b2f67
        ... <More>

Also add an assert that
`AccessibleBrowseBoxTable::implGetHeaderBar` only
gets called with indices for row/col header, not
arbitrary integers.

Change-Id: Id7ebab9bfa8a7f05cb43da1bf5756e5980f4ed20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156012
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-08-23 22:21:59 +02:00
..
inc a11y: Make AccessibleBrowseBoxBase's client ID private 2023-08-23 22:21:41 +02:00
source tdf#99609 tdf#156473 a11y: Check whether row header exists 2023-08-23 22:21:59 +02:00
AllLangMoTarget_acc.mk
IwyuFilter_accessibility.yaml tdf#42949 Fix new IWYU warnings in directories [ab]* 2020-11-05 14:57:25 +01:00
Library_acc.mk Accessibility for IconView 2022-06-09 17:49:16 +02:00
Makefile
Module_accessibility.mk
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00

Accessibility Support for LibreOffice

Provides accessible components for LibreOffice