Bug 145104 - Accessibility: Paragraph Style "Index" has no language set - The accessibility check should not check styles
Summary: Accessibility: Paragraph Style "Index" has no language set - The accessibilit...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.2 rc
Hardware: All All
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:7.5.0 target:7.4.3 inReleaseNo...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: a11y, Accessibility Writer-Styles
  Show dependency treegraph
 
Reported: 2021-10-13 01:07 UTC by Stéphane Guillou (stragu)
Modified: 2022-12-06 11:47 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2021-10-13 01:07:46 UTC
Description:
Even on an empty document, the Accessibility Check tool raises the irrelevant "Style 'Index' has no language set" issue.

Steps to Reproduce:
1. Open Writer
2. Go to Tools > Accessibility Check
3. See results of check

Actual Results:
The issue "Style 'Index' has no language set" is listed.

Expected Results:
The issues "Style 'Index' has no language set" should not be listed as the Index style is not used in the document (and I don't even know how to change a style's language...).


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Seems to be a regression, as it was not reproduced with:

Version: 7.1.6.2 / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

But was reproduced with:

Version: 7.2.1.2 / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 5b2848413883565c48d312c96daf8fbca25405d8
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-10-11_23:38:53
Calc: threaded
Comment 1 Dieter 2021-10-28 07:22:26 UTC
As far as I could see, PS "Index" ist the only PS without an language (Modify PS => Tab "Font" => Language). If you change language to default language, message disappears.

So I changed bug summary a bit.
Comment 2 Aron Budea 2021-10-31 18:25:13 UTC
Bibisected to the 7.2 backport of the following commit using repo bibisect-linux-64-7.2. Adding CC: to Heiko Tietze.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=137a1d5380e310a43d36932c643e1331a94fd70d
author		Heiko Tietze <tietze.heiko@gmail.com>	2021-07-19 16:40:50 +0200
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	2021-07-20 07:02:54 +0200

Resolves tdf#143066 - Language set to None for indices
Comment 3 Heiko Tietze 2021-11-08 07:30:22 UTC
Me suggests to resolve NAB, see bug 143066.
Comment 4 Mike Kaganski 2021-11-08 07:38:28 UTC
Two issues here.
1. The accessibility check should not check this for styles. The check itself is *wrong*, since only the actual data must have an assigned unambiguous language, not styles (there may well be legitimate cases to *not* set style languages).
2. The fix in bug 143066 was indeed just a hack: it did not make what the bug asked for (disable the check for the field), but instead relied on some style being used for the field, and not used for anything else, which both may be false in some cases.
Comment 5 Heiko Tietze 2021-11-08 07:42:27 UTC
(In reply to Mike Kaganski from comment #4)
> 2. The fix in bug 143066 was indeed just a hack...

Then let's revert and implement a condition.
Comment 6 Mike Kaganski 2021-11-08 07:43:52 UTC
(In reply to Heiko Tietze from comment #5)
> Then let's revert and implement a condition.

It is a hack, but still an improvement. Of course, it would be great to implement the proper fix and revert the hack - but only in that order :-)
Comment 7 Heiko Tietze 2021-11-08 07:48:56 UTC
(In reply to Mike Kaganski from comment #6)
> implement the proper fix and revert the hack - but only in that order :-)

Well, a bit too hackish for my taste and I'd change the order. But anyway, I pressed one button, you do the next (submit or abandon *g*) in https://gerrit.libreoffice.org/c/core/+/124705
Comment 8 Adalbert Hanßen 2021-11-08 09:42:02 UTC
On the other thread #143066 I reported some other side findings of accessibility check and posted some example: https://bugs.documentfoundation.org/attachment.cgi?id=176150. The whole concept of Accessibility check could still be a bit unfinished.
Comment 9 ⁨خالد حسني⁩ 2022-10-03 11:19:53 UTC
I’m going to revert the change in bug 143066, as well as a similar change introduced in https://bz.apache.org/ooo/show_bug.cgi?id=40133.

As explained, setting language to none is just a hack, further more language is used for many things other than spell checking e.g. localized digits (bug 126657, which also happens to ToC because of the change in bug 143066), OpenType layout (which can be sensitive to language, for example Turkish disables fi ligature because it also uses dot-less i, to many Cyrillic-using languages having different glyph forms for the same Unicode code points, or fonts like Noto Sans/Serif CJK that switch between Japanese/Chinese/Korean glyph forms based on language, AKA Han Unification).

A way to disable spell checking might be needed, but it should be independent of language setting (at least not in pre-definied styles, document authors can do whatever they want).

https://gerrit.libreoffice.org/c/core/+/140902
Comment 10 Commit Notification 2022-10-04 10:05:20 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cca160f8bfc4597cf0ad3aaaf0017a5210ea0ec

tdf#126657, tdf#145104: Don’t set language to none on defined styles

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 11 ⁨خالد حسني⁩ 2022-10-04 10:11:11 UTC
This is now fixed for new documents, old documents need to edit the affected character style manually.
Comment 12 Commit Notification 2022-10-05 07:13:34 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/7199097b1602f057129a12b3771220c1bc23fd1e

tdf#126657, tdf#145104: Don’t set language to none on defined styles

It will be available in 7.4.3.

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 13 Stéphane Guillou (stragu) 2022-10-05 11:12:22 UTC
Verified as fixed in:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: a36173359d4614a8935e2f764acadfcf736e091c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you very much Khaled! :)