Bug 160971 - a11y: Editable comboboxes not properly announced by Orca
Summary: a11y: Editable comboboxes not properly announced by Orca
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:24.8.0
Keywords: accessibility
Depends on:
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2024-05-07 08:13 UTC by Michael Weghorn
Modified: 2024-05-29 07:48 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screencast of the issue (6.68 MB, video/x-matroska)
2024-05-07 08:13 UTC, Michael Weghorn
Details
Screencast qt6 VCL plugin with Orca git main (5.94 MB, video/x-matroska)
2024-05-27 11:46 UTC, Michael Weghorn
Details
GTK 3 sample program using native GtkComboBox (492 bytes, text/x-python)
2024-05-27 11:47 UTC, Michael Weghorn
Details
Qt sample program using a native QComboBox (266 bytes, text/x-c++src)
2024-05-27 11:48 UTC, Michael Weghorn
Details
Screencast showing behavior with native Qt and GTK comboboxes (10.49 MB, video/x-matroska)
2024-05-27 11:50 UTC, Michael Weghorn
Details
Sample program with a combobox form element (9.88 KB, application/vnd.oasis.opendocument.text)
2024-05-27 12:05 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weghorn 2024-05-07 08:13:55 UTC
Created attachment 194013 [details]
Screencast of the issue

When using the Orca screen reader on Linux, editable comboboxes are not properly announced.

Sample steps to reproduce:

1) start Orca
2) start LO Writer
3) press F6 until the formatting toolbar is focused
4) press Tab until the "Font Name" combobox is focused
5) switch between entries by using the up/down keys

Actual result:

The new value is not reliably announced. See attached screencast.

Expected result:

The new value should be announced by Orca

Tested with Orca 46.1-1 from Debian testing and current orca git main as of commit d19b34d5946cf86ef6294b4796582f42020c29b7.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b420a5cd2424d2fc5efa3fcc395d14366f4b2773
CPU threads: 32; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2024-05-07 08:17:10 UTC
Related earlier discussion with Joanmarie Diggs, the Orca maintainer: see tdf#160806
Comment 2 Commit Notification 2024-05-07 14:18:16 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9f078ed7b625e86182d64d5ccfbb410cdd38081c

tdf#160971 gtk3 a11y: Set role for custom editable combobox

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Michael Weghorn 2024-05-08 09:45:39 UTC
One issue with current Orca main is that the first time that an editable combobox receives focus, it is not announced.

That turns out to happen since Orca dropped support for the deprecated "focus" event in commit [1]:

    commit 9e2902dd46c7e583a097e235dfd7e3c50b016383
    Author: Joanmarie Diggs
    Date:   Wed May 1 12:14:07 2024 +0200

        Remove the on_focus handler for the LibreOffice script
        
        The "focus:" event was deprecated many years ago. If the expected
        "object:state-changed:focused" event is absent, that bug should
        be fixed.

Pending MR for GTK 3 to emit the "object:state-changed:focused" event instead of the deprecated "focus" event:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7239

With that MR in place, that announcement works again.


[1] https://gitlab.gnome.org/GNOME/orca/-/commit/9e2902dd46c7e583a097e235dfd7e3c50b016383
Comment 4 Commit Notification 2024-05-10 14:25:08 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c24db71bc56c5d81a6e8fb744442b6d6358992d0

tdf#160971 a11y: Add null check in AccessibleListBox::getAccessibleRole

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2024-05-10 19:50:47 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ab7a94b8403e7fc89398a603a10e9002bd7e2077

tdf#160971 a11y: Send full text on changed combobox text

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-05-24 04:26:50 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee168614ddea2f349e80372599296e835080f264

tdf#160971 gtk3 a11y: Manually unset focus for combobox popup

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Michael Weghorn 2024-05-27 11:46:03 UTC
Created attachment 194372 [details]
Screencast qt6 VCL plugin with Orca git main
Comment 8 Michael Weghorn 2024-05-27 11:47:16 UTC
Created attachment 194373 [details]
GTK 3 sample program using native GtkComboBox
Comment 9 Michael Weghorn 2024-05-27 11:48:09 UTC
Created attachment 194374 [details]
Qt sample program using a native QComboBox
Comment 10 Michael Weghorn 2024-05-27 11:50:40 UTC
Created attachment 194375 [details]
Screencast showing behavior with native Qt and GTK comboboxes
Comment 11 Michael Weghorn 2024-05-27 11:58:13 UTC
Screencast attachment 194372 [details] shows the current behavior with Orca git main (as of commit c702b5acb9bd78a5812886a5d1c51409115e3900) and LO master (as of 838f6adc9bdde2f656eb26bdc2870adfa7aa412b) when using the qt6 VCL plugin:

When switching between entries using the up/down arrow keys in the non-expanded editable combobox, Orca announces "selection deleted" in addition to the new text. This is because the entry text automatically gets selected when switching entries (and therefore gets unselected again when switching entries).

The behavior when using a native QComboBox is different (s. sample program attachment 194374 [details] and screencast attachment 194375 [details] - the left example is the Qt one): When switching entries, the text is not selected. The text cursor is always set to the end of the combobox entry's text.

This is similar when using sample GTK 3 program  attachment 194373 [details] with a native GtkComboBox, except that the cursor there is always set to the beginning of the entry's text, also seen in screencast attachment 194375 [details] - the right-hand example is the GTK one.

On the other hand, a sample Windows Forms applications on Windows showed the same selection behavior as LO currently does, so leaving it as is there is potentially the most consistent to integrate well with the platform behavior.

I plan to align the behavior of LO's comboboxes with the toolkit/platform behavior.
Comment 12 Michael Weghorn 2024-05-27 12:05:45 UTC
Created attachment 194376 [details]
Sample program with a combobox form element
Comment 13 Commit Notification 2024-05-28 04:47:38 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/98f9e9aa6c0dcfdb1ae9ec0ca9a3f6a557ae7396

tdf#160971 vcl a11y: Make combobox text selection mode style-able

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2024-05-28 04:47:40 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3776874c20b4d4b2b24850c5f21e3b89a7feaaea

tdf#160971 qt a11y: Don't select combobox text on entry selection

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2024-05-28 04:47:42 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4b53712cccfa48fc7d1f754d6a596204e041d554

tdf#160971 gtk: Don't select combobox text on entry selection

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Michael Weghorn 2024-05-28 10:01:49 UTC
(In reply to Michael Weghorn from comment #11)
> I plan to align the behavior of LO's comboboxes with the toolkit/platform
> behavior.

That's done now and announcement with Orca git main (as of commit c702b5acb9bd78a5812886a5d1c51409115e3900) works now for both, the gtk3 and qt6 VCL plugins.

While working on this, I noticed a somewhat related issue for the gtk3 VCL plugin: Selecting a value using the keyboard only by expanding the popup doesn't work, the new value isn't actually applied. More detailed description and fix now pending in Gerrit:
https://gerrit.libreoffice.org/c/core/+/125645
Comment 17 Michael Weghorn 2024-05-28 10:02:51 UTC
(In reply to Michael Weghorn from comment #16)
> While working on this, I noticed a somewhat related issue for the gtk3 VCL
> plugin: Selecting a value using the keyboard only by expanding the popup
> doesn't work, the new value isn't actually applied. More detailed
> description and fix now pending in Gerrit:
> https://gerrit.libreoffice.org/c/core/+/125645

Correct link: https://gerrit.libreoffice.org/c/core/+/168146
Comment 18 Commit Notification 2024-05-29 07:48:14 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/405cf00e4818886b0d3053d03cfb2e3f3a5e8eb8

related tdf#160971 gtk3 a11y: Keep new combobox value

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.