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
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.
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
Me suggests to resolve NAB, see bug 143066.
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.
(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.
(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 :-)
(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
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.
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
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.
This is now fixed for new documents, old documents need to edit the affected character style manually.
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.
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! :)