Bug 117173 - Search Dialog does not provide search results to Assistive Technology tools at 5.2 and later, results are recorded to GUI without accessible event as text in SetSearchLabel()
Summary: Search Dialog does not provide search results to Assistive Technology tools a...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0
Keywords: accessibility, bibisected, bisected, regression
Depends on: 119788
Blocks: a11y, Accessibility Find-Search
  Show dependency treegraph
 
Reported: 2018-04-23 07:28 UTC by zahra
Modified: 2022-09-27 12:29 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
accessiblity information message dialog option (618.29 KB, video/x-matroska)
2022-08-07 00:53 UTC, Jim Raykowski
Details
Screencast with master: working announcement (4.06 MB, video/webm)
2022-09-27 12:29 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zahra 2018-04-23 07:28:08 UTC
Description:
when nvda does not announce automaticly how many items are replaced, i cant understand the result of my work and i dont know how many items libreoffice found and replaced.
libreoffice dialogs and messages were very great and accessible in 4.3 and 4.4, but i dont understand why it becomes less accessible in every release!
in previous versions like 4.3 and 4.4, i could read easily the messages using tab, but now, even nvda does not announce them automaticly!

Steps to Reproduce:
1- in libreoffice 5.2 and later, open a file in writer.
2- activate nvda screen reader.
3- press control+h to activate find and replace dialog.
4- write one word in the first edit box and one another word to replace it in the second edit box (replace with).
5- press replace all button.
6- do the above steps with libreoffice 5.1 and previous versions.

Actual Results:  
in libreoffice 5.2 and later, nvda does not announce how many items are replaced automaticly. even you cant read informations using tab key.

Expected Results:
in libreoffice 5.2 and later, like versions 5.1 and previous ones, nvda announces automaticly how many items are replaced and also even you can read this information using tab.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
i am sure that this problem is related to https://bugs.documentfoundation.org/show_bug.cgi?id=98539
it is not an inhancement and positive point for libreoffice, it just adds one another issue for screen reader users.
note:
in openoffice i cant read the information for how many items are replaced by using tab, but nvda announces this information automaticly in replace all!


User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Buovjaga 2018-05-14 13:33:43 UTC
Bisected to https://cgit.freedesktop.org/libreoffice/core/commit/?id=beeef93480fae65840646e4e36aa888efe92579a

tdf#98417, tdf#98539: DIALOG: Improvements to the Find & Replace dialog.
Added Find Previous Button.
Replaced backward checkbox with 'Replace Backward' from other options.
Modified Dialog Layout as per the attachment in bug report.
Removed vertical spacing in parent_container_box to reduce height of the dialog.
Removed InfoBox from ReplaceAll functionality in writer, shifted it to SearchLabel.
Attribute labels only show up when attribues are used in search, else they remain hidden.

Change-Id: I0e9ded854fc2601524d6fc2a0ba5e9cb602e11a4
Reviewed-on: https://gerrit.libreoffice.org/23057

Committer has stopped working on LibreOffice so I will not CC him.

Also reproduced with 6.1 alpha1 on Win 10.
Comment 2 V Stuart Foote 2018-05-14 14:44:42 UTC
Search results are writen to Dialog GUI as text label, with no a11y event recording result.

The dialog can be read back with AT provided screen review or graphics API, but there is no accessible event or navigable / focusable results for search or replacement actions.

https://opengrok.libreoffice.org/xref/core/svx/source/dialog/srchdlg.cxx?a=true&h=2460#2463
Comment 3 zahra 2018-05-14 16:45:51 UTC
i believe that it relates to
https://bugs.documentfoundation.org/show_bug.cgi?id=98539
am i right?
i did not find any change or new feature in 5.2 that caused this regression.
recently, i learnt how to use expert configuration.
can someone please tell me exactly which item should i write in the search box and how should i edit it to return previous behaviour of libreoffice in search dialog and using replace all?
thanks so much for any help, i am waiting for your help about your advice for changing expert configuration settings, God bless you all!
Comment 4 V Stuart Foote 2018-05-14 18:44:19 UTC
(In reply to zahra from comment #3)
> i believe that it relates to
> https://bugs.documentfoundation.org/show_bug.cgi?id=98539
> am i right?

Yes that is where the regression occurred, an information box was removed and replaced with a Label showing the results to dialog. By convention, labels are not normally exposed the AT tools.
 
> can someone please tell me exactly which item should i write in the search
> box and how should i edit it to return previous behaviour of libreoffice in
> search dialog and using replace all?

Sorry, there is nothing you can do with your user configuration. A developer will  decide how they'd like to fix this.  But at least on Windows with NVDA the label is exposed to Screen review, and via graphics API with mouse over. Linux users with ORCA can not navigate to the search/replace result label--but it will sound during reading the dialog frame.

When this rework of the Find & Replace dialog was implemented at 5.2 release the impact of labeling the GUI on accessibility slipped through.

@Thorsten, Caolán -- with removal of message box/info box in https://gerrit.libreoffice.org/#/c/23057/ is there actually some way to make labels on UI directly accessible? Or, do they have to be changed to another object type and be able to take focus to sound with results?
Comment 5 Alex ARNAUD 2018-05-14 18:59:15 UTC
> @Thorsten, Caolán -- with removal of message box/info box in
> https://gerrit.libreoffice.org/#/c/23057/ is there actually some way to make
> labels on UI directly accessible? Or, do they have to be changed to another
> object type and be able to take focus to sound with results?

I've also added Samuel in CC because it has worked with Hypra on accessibility non regression check tool on LibreOffice.

@Samuel: I assume your input we'll be helpful to help us to find the better way to figure out this issue.

Best regards,
Alex.
Comment 6 Samuel Thibault 2018-05-14 19:02:36 UTC
AIUI, using a STATIC role would fix it, see

https://bugs.documentfoundation.org/show_bug.cgi?id=116542

for discussing about adding it.
Comment 7 zahra 2018-05-14 19:09:55 UTC
> can someone please tell me exactly which item should i write in the search
> box and how should i edit it to return previous behaviour of libreoffice in
> search dialog and using replace all?


Sorry, there is nothing you can do with your user configuration. A developer will  decide how they'd like to fix this.

for me who cant and dont use new version of libreoffice, the fix in the future, does not make a difference.
i wish that change expert configuration and i ment which item i should write in the expert configuration and how i change it to have previous behaviour?
or, should i use 5.1.6 forever that not have this issue!
Comment 8 V Stuart Foote 2018-05-14 19:39:15 UTC
(In reply to zahra from comment #7)
 
> Sorry, there is nothing you can do with your user configuration. A developer
> will  decide how they'd like to fix this.
> 
> for me who cant and dont use new version of libreoffice, the fix in the
> future, does not make a difference.
> i wish that change expert configuration and i ment which item i should write
> in the expert configuration and how i change it to have previous behaviour?
> or, should i use 5.1.6 forever that not have this issue!

@Zahra,  sorry but it can not be corrected by any user action from 5.2.0 builds onward, so you are limited to a 5.1.6 release--or to using NVDAs graphics API or Screen review mode-- while you are stuck with Windows XP. 

Your choice...
Comment 9 Xisco Faulí 2018-06-05 19:26:30 UTC
Adding Cc: to Akshay Deep
Comment 10 QA Administrators 2019-06-06 02:54:52 UTC Comment hidden (obsolete)
Comment 11 Samuel Thibault 2019-06-11 15:45:22 UTC
I tried version 6.3.0.0.alpha1+ b26b6cab5d8147d35f76a21c333719c80840d08d (2019-05-20_23:15:15), it does give a static role to the text that zahra wants pronounced, but Orca does not seem to be pronouncing it when it gets updated (I'm using Orca master). Joanmarie, the following event is sent by libreoffice's widget with static role, is anything else needed for Orca to pronounce it?

object:text-changed:insert(0, 32, Terme recherché remplacé 2 fois.)
	source: [static | ]
	application: [application | soffice]
Comment 12 Samuel Thibault 2019-06-11 15:50:40 UTC
Ah, this was discussed in https://gitlab.gnome.org/GNOME/orca/issues/12 , we'd actually need to use a NOTIFICATION role https://bugs.documentfoundation.org/show_bug.cgi?id=119788 , thus adding the dependency.
Comment 13 Samuel Thibault 2019-06-11 15:53:50 UTC
Jamie, I don't know if the current 6.3 version with static role does get the feedback spoken? As mentioned in https://bugs.documentfoundation.org/show_bug.cgi?id=119788 , perhaps another role would be needed for NVDA to consider speaking the text?
Comment 14 zahra 2020-06-21 11:28:48 UTC
Hello.
i tested today with version 5.4.7.2 on windows xp.
and nvda did not read found items for me and how many items are found!
even find-replace and using replace all, is not very easy to use for screen readers.
Comment 15 QA Administrators 2022-06-23 03:47:26 UTC Comment hidden (obsolete)
Comment 16 Jim Raykowski 2022-08-07 00:53:00 UTC
Created attachment 181648 [details]
accessiblity information message dialog option

Request for comments on an accessibility option to show information dialogs for screen reader use.

https://gerrit.libreoffice.org/c/core/+/137914
Comment 17 Commit Notification 2022-09-05 13:59:04 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/26e33cb1fc7024d04b68569f904ffd8583aef1fb

tdf#117173 make search label read by screen reader

It will be available in 7.5.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 18 Commit Notification 2022-09-16 10:04:40 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/155e8b1683f10847ff18e75287e2466220242bb1

tdf#117173: qt a11y: Forward changes to SHOWING state

It will be available in 7.5.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 19 Commit Notification 2022-09-26 03:55:50 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/947fe0d89dee75ee43515ef7dfb43837d65a45bc

tdf#119788 tdf#117173 add accessibility NOTIFICATION role

It will be available in 7.5.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 20 Commit Notification 2022-09-26 14:15:46 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117173 a11y: Send SHOWING state change event on Window{Show,Hide}

It will be available in 7.5.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 21 Commit Notification 2022-09-26 14:15:58 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/995d17697d1e46f66df67ca3132369d76caea29e

tdf#117173 wina11y: Send EVENT_SYSTEM_ALERT when notification shows

It will be available in 7.5.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 22 Michael Weghorn 2022-09-26 15:21:12 UTC
(In reply to Commit Notification from comment #19)
> Jim Raykowski committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 947fe0d89dee75ee43515ef7dfb43837d65a45bc
> 
> tdf#119788 tdf#117173 add accessibility NOTIFICATION role

That's the main commit, the ones from comment 18, comment 20 and comment 21 are related changes needed for qt6 and Windows in addition.

-> Thanks, Jim! Closing as FIXED.

(In reply to Samuel Thibault from comment #13)
> Jamie, I don't know if the current 6.3 version with static role does get the
> feedback spoken? As mentioned in
> https://bugs.documentfoundation.org/show_bug.cgi?id=119788 , perhaps another
> role would be needed for NVDA to consider speaking the text?

At the moment, the ALERT role, together with an extra EVENT_SYSTEM_ALERT is used to make NVDA speak the notification text (which is what I observed was happening for browser alerts in Firefox and Edge), s. the commit from comment 21. If there's a better way to do it, input is welcome.

macOS hasn't been tested yet, so any feedback from macOS users would also be welcome.
Comment 23 Michael Weghorn 2022-09-27 12:29:56 UTC
Created attachment 182694 [details]
Screencast with master: working announcement

Attached a screencast with current LO master and Orca 43.0, i.e. the LO changes mentioned in this ticket as well as Orca MR
https://gitlab.gnome.org/GNOME/orca/-/merge_requests/134 (to avoid double announcement) in place

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 995d17697d1e46f66df67ca3132369d76caea29e
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded