cf627ab2c8
Since commit9f078ed7b6
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>
128 lines
4.9 KiB
XML
128 lines
4.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Generated with glade 3.40.0 -->
|
|
<interface domain="vcl">
|
|
<requires lib="gtk+" version="3.20"/>
|
|
<object class="GtkBox" id="box">
|
|
<property name="name">combobox</property>
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="no-show-all">True</property>
|
|
<child>
|
|
<object class="GtkEntry" id="entry">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">True</property>
|
|
<property name="no-show-all">True</property>
|
|
<property name="activates-default">True</property>
|
|
<property name="truncate-multiline">True</property>
|
|
<style>
|
|
<class name="combo"/>
|
|
</style>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">True</property>
|
|
<property name="fill">True</property>
|
|
<property name="position">1</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkToggleButton" id="button">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">True</property>
|
|
<property name="receives-default">True</property>
|
|
<property name="no-show-all">True</property>
|
|
<property name="always-show-image">True</property>
|
|
<property name="draw-indicator">True</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<child>
|
|
<object class="GtkImage" id="arrow">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="icon-name">pan-down-symbolic</property>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="pack-type">end</property>
|
|
<property name="position">0</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child internal-child="accessible">
|
|
<object class="AtkObject" id="button-atkobject">
|
|
<property name="AtkObject::accessible-role">combo-box</property>
|
|
</object>
|
|
</child>
|
|
<style>
|
|
<class name="combo"/>
|
|
</style>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">True</property>
|
|
<property name="pack-type">end</property>
|
|
<property name="position">2</property>
|
|
</packing>
|
|
</child>
|
|
<style>
|
|
<class name="linked"/>
|
|
</style>
|
|
</object>
|
|
<object class="GtkMenuButton" id="overlaybutton">
|
|
<property name="can-focus">True</property>
|
|
<property name="receives-default">True</property>
|
|
<property name="no-show-all">True</property>
|
|
<property name="draw-indicator">True</property>
|
|
<property name="use-popover">False</property>
|
|
<child>
|
|
<object class="GtkImage" id="overlayarrow">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="icon-name">pan-down-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<object class="GtkWindow" id="popup">
|
|
<property name="name">gtk-combobox-popup-window</property>
|
|
<property name="can-focus">False</property>
|
|
<property name="type">popup</property>
|
|
<property name="resizable">False</property>
|
|
<property name="modal">True</property>
|
|
<property name="type-hint">combo</property>
|
|
<child>
|
|
<object class="GtkOverlay" id="overlay">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">False</property>
|
|
<child>
|
|
<object class="GtkScrolledWindow" id="scrolledwindow">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">True</property>
|
|
<property name="hscrollbar-policy">never</property>
|
|
<property name="shadow-type">in</property>
|
|
<property name="overlay-scrolling">False</property>
|
|
<child>
|
|
<object class="GtkTreeView" id="treeview">
|
|
<property name="visible">True</property>
|
|
<property name="can-focus">True</property>
|
|
<property name="headers-visible">False</property>
|
|
<property name="enable-search">False</property>
|
|
<property name="search-column">0</property>
|
|
<property name="show-expanders">False</property>
|
|
<property name="activate-on-single-click">True</property>
|
|
<child internal-child="selection">
|
|
<object class="GtkTreeSelection"/>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="index">-1</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</interface>
|