Repository navigation
macOS a11y: let other apps set values on accessibility elements - #69
Open
kayakthedev wants to merge 1 commit into
Open
kayakthedev wants to merge 1 commit into
kayakthedev wants to merge 1 commit into
Conversation
AquaA11yWrapper is an NSAccessibilityElement and overrides the NSAccessibility protocol's getters (accessibilityValue etc.), but none of its setters. When another process sets an attribute with AXUIElementSetAttributeValue(), AppKit calls the protocol setter, e.g. -setAccessibilityValue:, and NSAccessibilityElement's own implementation drops the value. -accessibilitySetValue:forAttribute:, which dispatches to the component, text, selection and value wrappers, is never reached. Since isAccessibilitySelectorAllowed: allows the setters for settable attributes, the caller is told the attribute is settable and the write succeeds, but nothing changes. Measured on macOS 26 with Calc: setting a cell's AXValue to a string, to 42 and to 3.5, and setting its AXSelectedText, all returned kAXErrorSuccess, and the cell stayed empty. A standalone NSAccessibilityElement subclass built the same way shows the same on macOS 26: AXValue reported settable, the write returned success, and -accessibilitySetValue:forAttribute: was not called until -setAccessibilityValue: was overridden to forward to it. So: - Add the setters for the attributes the wrappers can set (AXValue, AXFocused, AXSelectedText, AXSelectedTextRange, AXSelectedChildren), each forwarding to -accessibilitySetValue:forAttribute:. - AquaA11yValueWrapper passed Any( [ number longValue ] ). long is 64 bit on macOS, so that Any is a hyper, from which neither a sal_Int32 (scroll bars, check boxes, ...) nor a double (Calc and Writer cells, numeric fields) can be extracted, so setCurrentValue() never took it. Use the type of the current value instead, as the Qt backend does in QtAccessibleWidget::setCurrentValue(), and double otherwise. A number set as a Calc cell's AXValue then reaches ScAccessibleCellBase::setCurrentValue(). - AquaA11yTextWrapper's AXValue setter was an empty TODO, while isAttributeSettable: reports AXValue settable for every non static text element. Implement it with XAccessibleEditableText::setText() when the element has editable text, like the AXSelectedText setter next to it does with replaceText(). Elements without XAccessibleEditableText (e.g. Calc cells, whose text is AccessibleStaticTextBase) still report AXValue and AXSelectedText settable through the text wrapper and ignore a string; that is left as it is here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: I32ea2c26baa6afe4bb77ac7f7bbc0e18462b8ebe
|
Please review the following documentation |
innotelinc
pushed a commit
to innotelinc/core
that referenced
this pull request
Nov 12, 2026
The UI file (cui/uiconfig/ui/optuserpage.ui) contains
a "cryptography" GtkFrame, with an internal GtkLabel
child that has the ID "cryptographylabel".
Use the weld::Frame API to get the label and don't rely
on a weld::Label existing for the internal child.
The latter doesn't exist for the case of using native
Qt widgets (qt6 vcl plugin with
SAL_VCL_QT_USE_WELDED_WIDGETS=1) where the QGroupBox
widget used in QtInstanceFrame handles the label
itself, without a separate child widget.
This fixes a crash/assert seen for the following scenario
with the qt6 vcl plugin and SAL_VCL_QT_USE_WELDED_WIDGETS=1:
* start Writer
* "Tools" -> "Options"
* type anything in the search box
Assertion and backtrace:
soffice.bin: /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtBuilder.hxx:125: T *QtBuilder::get(const OUString &) [T = QLabel]: Assertion `!pWidget || qobject_cast<T*>(pWidget)' failed.
Thread 1 received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
⚠ warning: 44 ./nptl/pthread_kill.c: No such file or directory
(rr) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
LibreOffice#1 0x00007f6ccd8a0dcf in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
LibreOffice#2 0x00007f6ccd84a582 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
LibreOffice#3 0x00007f6ccd832507 in __GI_abort () at ./stdlib/abort.c:77
LibreOffice#4 0x00007f6ccd833540 in __libc_message_impl (vma_name=vma_name@entry=0x7f6ccd9b4f9b "glibc: assert", fmt=<optimized out>) at ../sysdeps/posix/libc_fatal.c:138
LibreOffice#5 0x00007f6ccd842c61 in __libc_message_wrapper (vmaname=0x7f6ccd9b4f9b "glibc: assert", fmt=<optimized out>) at ../include/stdio.h:203
LibreOffice#6 __assert_fail (assertion=0x7f6cb996b027 "!pWidget || qobject_cast<T*>(pWidget)", file=0x7f6cb997ceee "/home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtBuilder.hxx", line=<optimized out>, function=<optimized out>)
at ./assert/assert.c:37
LibreOffice#7 0x00007f6cb9bfb05a in QtBuilder::get<QLabel> (this=0x7f6ca4002970, rId="cryptographylabel") at vcl/inc/qt6/../qt5/QtBuilder.hxx:125
LibreOffice#8 0x00007f6cb9ca508d in QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0::operator()() const (this=0x5561cb640050) at vcl/qt6/../qt5/QtInstanceBuilder.cxx:1075
LibreOffice#9 0x00007f6cb9ca5045 in std::__invoke_impl<void, QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0&>(std::__invoke_other, QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0&) (__f=...)
at /usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/bits/invoke.h:63
LibreOffice#10 0x00007f6cb9ca5005 in std::__invoke_r<void, QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0&>(QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0&) (__fn=...)
at /usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/bits/invoke.h:113
LibreOffice#11 0x00007f6cb9ca4eed in std::_Function_handler<void(), QtInstanceBuilder::weld_label(rtl::OUString const&)::$_0>::_M_invoke (__functor=...) at /usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/bits/std_function.h:295
LibreOffice#12 0x00007f6cb9c7d9ee in std::function<void()>::operator() (this=0x7ffc89a85e80) at /usr/lib/gcc/x86_64-linux-gnu/16/../../../../include/c++/16/bits/std_function.h:581
LibreOffice#13 0x00007f6cb9c752ff in QtInstance::RunInMainThread (this=0x5561c46b5460, func=...) at vcl/qt6/../qt5/QtInstance.cxx:216
LibreOffice#14 0x00007f6cb9c9c9ee in QtInstanceBuilder::weld_label (this=0x5561caa87490, rId="cryptographylabel") at vcl/qt6/../qt5/QtInstanceBuilder.cxx:1074
LibreOffice#15 0x00007f6c6971ba26 in SvxGeneralTabPage::GetAllStrings (this=0x5561ca30d830) at /home/michi/development/git/libreoffice/cui/source/options/optgenrl.cxx:418
LibreOffice#16 0x00007f6c697c450c in OfaTreeOptionsDialog::initializeCurrentDialog (this=0x5561ca2c6f00, pPageInfo=@0x7ffc89a863e8: 0x5561cb4a0cf0, xEntry=std::unique_ptr<weld::TreeIter> = {...})
at /home/michi/development/git/libreoffice/cui/source/options/treeopt.cxx:1189
LibreOffice#17 0x00007f6c697c3652 in OfaTreeOptionsDialog::initializeAllDialogs (this=0x5561ca2c6f00) at /home/michi/development/git/libreoffice/cui/source/options/treeopt.cxx:870
LibreOffice#18 0x00007f6c697c3010 in OfaTreeOptionsDialog::ImplUpdateDataHdl (this=0x5561ca2c6f00) at /home/michi/development/git/libreoffice/cui/source/options/treeopt.cxx:796
LibreOffice#19 0x00007f6c697bd1fd in OfaTreeOptionsDialog::LinkStubImplUpdateDataHdl (instance=0x5561ca2c6f00, data=0x5561ca2c6f70) at /home/michi/development/git/libreoffice/cui/source/options/treeopt.cxx:782
LibreOffice#20 0x00007f6cc39d7871 in Link<Timer*, void>::Call (this=0x5561ca2c6f90, data=0x5561ca2c6f70) at include/tools/link.hxx:105
LibreOffice#21 0x00007f6cc39d76dc in Timer::Invoke (this=0x5561ca2c6f70) at /home/michi/development/git/libreoffice/vcl/source/app/timer.cxx:75
LibreOffice#22 0x00007f6cc397f6dd in Scheduler::CallbackTaskScheduling () at /home/michi/development/git/libreoffice/vcl/source/app/scheduler.cxx:615
LibreOffice#23 0x00007f6cb9dc6432 in SalTimer::CallCallback (this=0x5561c59d0cb0) at vcl/inc/saltimer.hxx:53
LibreOffice#24 0x00007f6cb9dc59f2 in QtTimer::timeoutActivated (this=0x5561c59d0ca0) at vcl/qt6/../qt5/QtTimer.cxx:54
LibreOffice#25 0x00007f6cb9dc6c11 in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()LibreOffice#1}::operator()() const (this=0x7ffc89a885e0)
at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:128
LibreOffice#26 0x00007f6cb9dc6b49 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()LibreOffice#1}>(void**, QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)::{lambda()LibreOffice#1}&&) (args=0x7ffc89a889c0, fn=...)
at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:66
LibreOffice#27 0x00007f6cb9dc6a7b in QtPrivate::FunctorCall<std::integer_sequence<unsigned long>, QtPrivate::List<>, void, void (QtTimer::*)()>::call(void (QtTimer::*)(), QtTimer*, void**)
(f=(void (QtTimer::*)(class QtTimer * const)) 0x7f6cb9dc5970 <QtTimer::timeoutActivated()>, o=0x5561c59d0ca0, arg=0x7ffc89a889c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:127
LibreOffice#28 0x00007f6cb9dc69fd in QtPrivate::FunctionPointer<void (QtTimer::*)()>::call<QtPrivate::List<>, void>(void (QtTimer::*)(), QtTimer*, void**)
(f=(void (QtTimer::*)(class QtTimer * const)) 0x7f6cb9dc5970 <QtTimer::timeoutActivated()>, o=0x5561c59d0ca0, arg=0x7ffc89a889c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:175
LibreOffice#29 0x00007f6cb9dc6926 in QtPrivate::QCallableObject<void (QtTimer::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
(which=1, this_=0x5561c59d11c0, r=0x5561c59d0ca0, a=0x7ffc89a889c0, ret=0x0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:546
LibreOffice#30 0x00007f6cb8af0df2 in QtPrivate::QSlotObjectBase::call (this=0x5561c59d11c0, r=0x5561c59d0ca0, a=0x7ffc89a889c0) at qtbase/src/corelib/kernel/qobjectdefs_impl.h:462
LibreOffice#31 0x00007f6cb8d2413c in doActivate<false> (sender=0x5561c59d0cc0, signal_index=3, argv=0x7ffc89a889c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4475
LibreOffice#32 0x00007f6cb8d1abd3 in QMetaObject::activate (sender=0x5561c59d0cc0, m=0x7f6cb96fbf08 <QTimer::staticMetaObject>, local_signal_index=0, argv=0x7ffc89a889c0)
at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:4536
LibreOffice#33 0x00007f6cb8d5395b in QMetaObject::activate<void, QTimer::QPrivateSignal> (sender=0x5561c59d0cc0, mo=0x7f6cb96fbf08 <QTimer::staticMetaObject>, local_signal_index=0, ret=0x0, args=...) at qtbase/src/corelib/kernel/qobjectdefs.h:320
LibreOffice#34 0x00007f6cb8d52085 in QTimer::timeout (this=0x5561c59d0cc0, _t1=...) at qtbase/src/corelib/Core_autogen/include/moc_qtimer.cpp:182
LibreOffice#35 0x00007f6cb8d5203f in QTimer::timerEvent (this=0x5561c59d0cc0, e=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimer.cpp:332
LibreOffice#36 0x00007f6cb8d10805 in QObject::event (this=0x5561c59d0cc0, e=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qobject.cpp:1494
LibreOffice#37 0x00007f6cb6bb3de0 in QApplicationPrivate::notify_helper (this=0x5561c46661e0, receiver=0x5561c59d0cc0, e=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3269
LibreOffice#38 0x00007f6cb6bb7d19 in QApplication::notify (this=0x5561c4644ab0, receiver=0x5561c59d0cc0, e=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3219
LibreOffice#39 0x00007f6cb8c3f122 in QCoreApplication::notifyInternal2 (receiver=0x5561c59d0cc0, event=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1117
LibreOffice#40 0x00007f6cb8c3fd89 in QCoreApplication::sendEvent (receiver=0x5561c59d0cc0, event=0x7ffc89a89770) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1560
LibreOffice#41 0x00007f6cb903739f in QTimerInfoList::activateTimers (this=0x5561c46e21c0) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtimerinfo_unix.cpp:427
LibreOffice#42 0x00007f6cb92d0d85 in timerSourceDispatch (source=0x5561c46e2160) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:153
LibreOffice#43 0x00007f6cb92d1064 in idleTimerSourceDispatch (source=0x5561c46d6100) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:200
LibreOffice#44 0x00007f6cbdf09e97 in g_main_dispatch (context=context@entry=0x7f6cac000f70) at ../../../glib/gmain.c:3734
LibreOffice#45 0x00007f6cbdf0d60f in g_main_context_dispatch_unlocked (context=0x7f6cac000f70) at ../../../glib/gmain.c:4603
LibreOffice#46 g_main_context_iterate_unlocked (context=context@entry=0x7f6cac000f70, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4672
LibreOffice#47 0x00007f6cbdf0df00 in g_main_context_iteration (context=0x7f6cac000f70, may_block=1) at ../../../glib/gmain.c:4738
LibreOffice#48 0x00007f6cb92cfb0b in QEventDispatcherGlib::processEvents (this=0x5561c46439f0, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:402
LibreOffice#49 0x00007f6cb83e45e8 in QPAEventDispatcherGlib::processEvents (this=0x5561c46439f0, flags=...) at /home/michi/development/git/qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:90
LibreOffice#50 0x00007f6cb8c59b30 in QEventLoop::processEvents (this=0x7ffc89a89b68, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:109
LibreOffice#51 0x00007f6cb8c59d83 in QEventLoop::exec (this=0x7ffc89a89b68, flags=...) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:198
LibreOffice#52 0x00007f6cb7073f00 in QDialog::exec (this=0x5561ca1fea40) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:588
LibreOffice#53 0x00007f6cb9cd51d4 in QtInstanceDialog::run (this=0x5561c8dd2390) at vcl/qt6/../qt5/QtInstanceDialog.cxx:152
LibreOffice#54 0x00007f6cc3d4c0ae in weld::DialogController::run (this=0x5561ca2c6f00) at /home/michi/development/git/libreoffice/vcl/source/weld/DialogController.cxx:18
LibreOffice#55 0x00007f6c697d0667 in OfaTreeOptionsDialog::run (this=0x5561ca2c6f00) at /home/michi/development/git/libreoffice/cui/source/options/treeopt.cxx:2484
LibreOffice#56 0x00007f6c6963b4f1 in vcl::AbstractDialogImpl_BASE<VclAbstractDialog, OfaTreeOptionsDialog, std::unique_ptr, false>::Execute (this=0x5561ca31d940) at include/vcl/abstdlgimpl.hxx:46
LibreOffice#57 0x00007f6cc989087f in SfxApplication::OfaExec_Impl (this=0x5561c5d50010, rReq=...) at /home/michi/development/git/libreoffice/sfx2/source/appl/appserv.cxx:1660
LibreOffice#58 0x00007f6cc98694c5 in SfxStubSfxApplicationOfaExec_Impl (pShell=0x5561c5d50010, rReq=...) at workdir/SdiTarget/sfx2/sdi/sfxslots.hxx:1315
LibreOffice#59 0x00007f6cc99bd63e in SfxDispatcher::Call_Impl (this=0x5561c8f83b10, rShell=..., rSlot=..., rReq=..., bRecord=true) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:258
LibreOffice#60 0x00007f6cc99c1bb6 in SfxDispatcher::Execute_ (this=0x5561c8f83b10, rShell=..., rSlot=..., rReq=..., eCallMode=SfxCallMode::RECORD) at /home/michi/development/git/libreoffice/sfx2/source/control/dispatch.cxx:757
LibreOffice#61 0x00007f6cc99a9fbe in SfxBindings::Execute_Impl (this=0x5561c8f9bf80, aReq=..., pSlot=0x7f6cca0825c8 <aSfxApplicationSlots_Impl+5544>, rShell=...) at /home/michi/development/git/libreoffice/sfx2/source/control/bindings.cxx:1047
LibreOffice#62 0x00007f6cc9a7d8d6 in SfxDispatchController_Impl::dispatch (this=0x5561c9902a00, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:721
LibreOffice#63 0x00007f6cc9a7c414 in SfxOfficeDispatch::dispatch (this=0x5561c9902960, aURL=..., aArgs=empty uno::Sequence) at /home/michi/development/git/libreoffice/sfx2/source/control/unoctitm.cxx:254
LibreOffice#64 0x00007f6ccad4c5e4 in framework::(anonymous namespace)::AsyncMenuExecute (data=0x5561ca2fd230) at /home/michi/development/git/libreoffice/framework/source/uielement/menubarmanager.cxx:793
LibreOffice#65 0x00007f6cc331ae21 in Link<void*, void>::Call (this=0x5561c9943c28, data=0x5561ca2fd230) at include/tools/link.hxx:105
LibreOffice#66 0x00007f6cc3316761 in ImplHandleUserEvent (pSVEvent=0x5561c9943c20) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2314
LibreOffice#67 0x00007f6cc3313695 in ImplWindowFrameProc (_pWindow=0x5561c5d53f10, nEvent=SalEvent::UserEvent, pEvent=0x5561c9943c20) at /home/michi/development/git/libreoffice/vcl/source/window/winproc.cxx:2869
LibreOffice#68 0x00007f6cb9c5915c in SalFrame::CallCallback (this=0x5561c5a0d890, nEvent=SalEvent::UserEvent, pEvent=0x5561c9943c20) at vcl/inc/salframe.hxx:313
LibreOffice#69 0x00007f6cb9c7827f in QtInstance::ProcessEvent (this=0x5561c46b5460, aEvent=<incomplete type>) at vcl/qt6/../qt5/QtInstance.cxx:564
#70 0x00007f6cc38e330d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffc89a8c5d0) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:119
#71 0x00007f6cc38e31e4 in SalUserEventList::DispatchUserEvents (this=0x5561c46b5490, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/salusereventlist.cxx:120
#72 0x00007f6cb9c74ac1 in QtInstance::ImplYield (this=0x5561c46b5460, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:458
#73 0x00007f6cb9c77e41 in QtInstance::DoYield (this=0x5561c46b5460, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:480
#74 0x00007f6cc39aa7d6 in InnerYield (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:388
#75 0x00007f6cc39aa05f in Application::Yield () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:501
#76 0x00007f6cc39a9e45 in Application::Execute () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:363
#77 0x00007f6ccdb1ed55 in desktop::Desktop::Main (this=0x7ffc89a8e1c0) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1680
#78 0x00007f6cc39d46cc in ImplSVMainRun () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:234
#79 0x00007f6cb9c802d1 in SalInstance::SVMainRun (this=0x5561c46b5470) at vcl/inc/salinst.hxx:108
#80 0x00007f6cc39d3bf2 in ImplSVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:221
#81 0x00007f6cc39d5789 in SVMain () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:252
#82 0x00007f6ccdb98ffa in soffice_main () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:122
#83 0x00005561a97ad9fd in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51
#84 0x00005561a97ad9d7 in main (argc=2, argv=0x7ffc89a8e3d8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49
Change-Id: If81149fc3aca565a9d3bb31c98d8f126f5657515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/213164
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AquaA11yWrapper is an NSAccessibilityElement and overrides the
NSAccessibility protocol's getters (accessibilityValue etc.), but none
of its setters. When another process sets an attribute with
AXUIElementSetAttributeValue(), AppKit calls the protocol setter, e.g.
-setAccessibilityValue:, and NSAccessibilityElement's own implementation
drops the value. -accessibilitySetValue:forAttribute:, which dispatches
to the component, text, selection and value wrappers, is never reached.
Since isAccessibilitySelectorAllowed: allows the setters for settable
attributes, the caller is told the attribute is settable and the write
succeeds, but nothing changes.
Measured on macOS 26 with Calc: setting a cell's AXValue to a string,
to 42 and to 3.5, and setting its AXSelectedText, all returned
kAXErrorSuccess, and the cell stayed empty. A standalone
NSAccessibilityElement subclass built the same way shows the same on
macOS 26: AXValue reported settable, the write returned success, and
-accessibilitySetValue:forAttribute: was not called until
-setAccessibilityValue: was overridden to forward to it.
So:
Add the setters for the attributes the wrappers can set (AXValue,
AXFocused, AXSelectedText, AXSelectedTextRange, AXSelectedChildren),
each forwarding to -accessibilitySetValue:forAttribute:.
AquaA11yValueWrapper passed Any( [ number longValue ] ). long is 64
bit on macOS, so that Any is a hyper, from which neither a sal_Int32
(scroll bars, check boxes, ...) nor a double (Calc and Writer cells,
numeric fields) can be extracted, so setCurrentValue() never took it.
Use the type of the current value instead, as the Qt backend does in
QtAccessibleWidget::setCurrentValue(), and double otherwise. A number
set as a Calc cell's AXValue then reaches
ScAccessibleCellBase::setCurrentValue().
AquaA11yTextWrapper's AXValue setter was an empty TODO, while
isAttributeSettable: reports AXValue settable for every non static
text element. Implement it with XAccessibleEditableText::setText()
when the element has editable text, like the AXSelectedText setter
next to it does with replaceText().
Elements without XAccessibleEditableText (e.g. Calc cells, whose text
is AccessibleStaticTextBase) still report AXValue and AXSelectedText
settable through the text wrapper and ignore a string; that is left
as it is here.
This repository is a read-only mirror, so this is also ready for Gerrit as one commit (Change-Id I32ea2c26baa6afe4bb77ac7f7bbc0e18462b8ebe); a maintainer is welcome to carry it there. Not built inside a full LibreOffice build: the cause was confirmed with a standalone NSAccessibilityElement probe on macOS 26, and the new setters compile against the macOS SDK with -Werror.
🤖 Generated with Claude Code