summaryrefslogtreecommitdiff
path: root/starmath/inc/helpids.h
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-10-18 17:01:43 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-10-19 08:48:46 +0200
commitbfbaeb8192447265bdd78d1be4990947d135eb6e (patch)
tree8f1692e25d49896fbe03da780cc9d7e44cbbc025 /starmath/inc/helpids.h
parenta2fab652b4001baa9d19e058668dc6400ad482c7 (diff)
tdf#160982 wina11y: Drop extra screen reader check to enable a11y bridge
When initializing the a11y bridge on Windows, no longer check whether the screen reader parameter `SPI_GETSCREENREADER` [1] is explicitly set or require to explicitly enable by setting an `SAL_FORCE_IACCESSIBLE2` environment variable. For performance reasons, it of course makes sense to only enable the a11y bridge when there is actually assistive technology that makes use of it. However, `ImplInitAccessBridge` already only gets called when either support for assistive technology has explicitly been enabled in the settings (i.e. in "Tools" -> "Options" -> "LibreOfficeDev" -> "Accessibility", the "Support assistive technology tools (restart required" checkbox was checked) or when a `WM_GETOBJECT` message is received, whose documentation says [2]: > Sent by both Microsoft Active Accessibility and Microsoft UI Automation > to obtain information about an accessible object contained in a server > application. > > Applications never send this message directly. Microsoft Active > Accessibility sends this message in response to calls to > AccessibleObjectFromPoint, AccessibleObjectFromEvent, or > AccessibleObjectFromWindow. However, server applications handle this > message. UI Automation sends this message in response to calls to > IUIAutomation::ElementFromHandle, ElementFromPoint, and > GetFocusedElement, and when handling events for which a client has > registered. Both of these cases (explicitly enabled, AT requests information) justify enabling the a11y bridge by themselves, so drop the extra check. Qt's UIA bridge for example also gets activated when a WM_GETOBJECT message is received [3]. This makes both, Microsoft Narrator (screen reader shipped with Windows, but which doesn't set the `SPI_GETSCREENREADER` parameter) and Microsoft Accessibility Insights for Windows (a tool for a11y analysis/debugging) work - at least to a certain degree - without having to explicitly set the environment variable `SAL_FORCE_IACCESSIBLE2`. While LibreOffice doesn't have a UIA bridge at this point in time, Windows provides an MSAA (IAccessible) to UIA proxy that provides some basic information via UIA at least, see [4]: > The LegacyIAccessible control pattern is supported by the Microsoft > Active Accessibility to Microsoft UI Automation Proxy. As expected, a breakpoint or assert in `ImplInitAccessBridge` only got hit in my testing when either an AT was active or the above-mentioned option was explicitly enabled, not otherwise when starting or using LO. [1] https://learn.microsoft.com/en-us/windows/win32/winauto/screen-reader-parameter [2] https://learn.microsoft.com/en-us/windows/win32/winauto/wm-getobject [3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/windows/uiautomation/qwindowsuiaaccessibility.cpp?id=e9662a4b665144a5eca418925d331024ec71fa2c#n40 [4] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-implementinglegacyiaccessible Change-Id: Iddafb149b50771412ba59972d0401bada6a9f680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175172 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'starmath/inc/helpids.h')
0 files changed, 0 insertions, 0 deletions