Since
commit 9f078ed7b6
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue May 7 10:04:16 2024 +0200
tdf#160971 gtk3 a11y: Set role for custom editable combobox
Set the combobox a11y role for the box in the .ui file
used for the custom gtk3 combobox implementation.
With this in place, moving focus to the "Font Name" or
another editable combobox in the Writer toolbar now
makes Orca announce that one as "editable combobox"
rather than just "text".
, the combobox a11y role is set for the GtkBox of
the custom combobox implementation used for gtk3.
That box contains the edit (for editable comboboxes)
and the button.
While this is needed for editable comboboxes for
AT to identify this as a combobox when the edit
receives focus (by the fact that the edit's parent
has a combobox role), this resulted in Orca no
longer announcing the combobox role when the
button receives focus for non-editable comboboxes.
While the button also has the combobox role, Orca
has logic to not announce the role of combobox
children. (`SpeechGenerator._should_speak_role`
returns `false` for that case [1].)
To avoid this problem and make announcement for both,
editable and non-editable comboboxes work as expected,
no longer set a combobox role for the box in the .ui
file, but set it only for the editable combobox
in the C++ code.
[1] 78e44c625e/src/orca/speech_generator.py (L365-366)
Change-Id: Ia3ff00688f47e61d5a98c79f1a256061b2fb18a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175823
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>