https://bugs.documentfoundation.org/show_bug.cgi?id=153131
--- Comment #61 from Michael Weghorn <[email protected]> --- (In reply to Mike Kaganski from comment #60) > I /suspect/ that the API [1] assumes (or allows) the get_accChildCount to > return a number only reflecting *visible* children. In this case, scrolling > would generate EVENT_OBJECT_CREATE and EVENT_OBJECT_DESTROY events. Thanks. I just tested Excel (LTSC 2021) with NVDA's interactive Python console (move mouse over cell, then Insert+Ctrl+Z to open the console) and the result is "interesting". Excel doesn't seem to allow the "usual" way to access the children at all: > >>> mouse.name > '' > >>> mouse.role > <Role.TABLECELL: 29> > >>> mouse.parent > <NVDAObjects.window.excel.ExcelWorksheet object at 0x043BEDD0> > >>> sheet = mouse.parent > >>> sheet.childCount > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\__init__.pyc", line 1002, in _get_childCount > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\__init__.pyc", line 709, in _get_children > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\window\excel.pyc", line 898, in _get_firstChild > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 87, in new__getattr__ > File "comtypes\client\lazybind.pyc", line 168, in __getattr__ > File "comtypes\automation.pyc", line 746, in _invoke > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__ > _ctypes.COMError: (-2147418111, 'Call was rejected by callee.', (None, None, > None, 0, None)) > >>> sheet.childCount > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\__init__.pyc", line 1002, in _get_childCount > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\__init__.pyc", line 709, in _get_children > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\window\excel.pyc", line 898, in _get_firstChild > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 87, in new__getattr__ > File "comtypes\client\lazybind.pyc", line 168, in __getattr__ > File "comtypes\automation.pyc", line 746, in _invoke > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__ > _ctypes.COMError: (-2147418111, 'Call was rejected by callee.', (None, None, > None, 0, None)) > >>> sheet.children > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\__init__.pyc", line 709, in _get_children > File "baseObject.pyc", line 62, in __get__ > File "baseObject.pyc", line 168, in _getPropertyViaCache > File "NVDAObjects\window\excel.pyc", line 898, in _get_firstChild > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 87, in new__getattr__ > File "comtypes\client\lazybind.pyc", line 168, in __getattr__ > File "comtypes\automation.pyc", line 746, in _invoke > File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__ > _ctypes.COMError: (-2147418111, 'Call was rejected by callee.', (None, None, > None, 0, None)) > >>> sheet.getChild(0) There's also tdf#156657 about potentially limiting the amount of Calc cells to expose via a11y API, but that is currently waiting for feedback on what would be a proper way to do so. (I'm hesitant about the idea of just doing something without documentation on what's a proper way.) I've heard several times that in general, exposing only on-screen children is not great, since it e.g. breaks having a screen reader read out a whole document. (This is currently a problem with Writer, s. tdf#96492). Right now, I don't see a clear way forward on LO side and in my opinion, a11y clients like Windows Speech Recognition should also properly handle many children, so I think this should at least be reported to Microsoft. [1] and [2] are cases where something similar was addressed for NVDA and AT-SPI, but unfortunately, Windows Speech Recognition is closed source. [1] https://github.com/nvaccess/nvda/commit/0170323c19275febbaf6698f9d2aae68cafe571b [2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/138 -- You are receiving this mail because: You are the assignee for the bug.
