Bug 149115 - Accessibility Checker does not check for title property containing only white space
Summary: Accessibility Checker does not check for title property containing only white...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: medium normal
Assignee: Hao Liu
URL:
Whiteboard: target:7.5.0 target:7.4.1
Keywords: accessibility, difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: a11y, Accessibility File-Properties
  Show dependency treegraph
 
Reported: 2022-05-16 21:08 UTC by Christophe Strobbe
Modified: 2022-10-02 14:15 UTC (History)
3 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 Christophe Strobbe 2022-05-16 21:08:41 UTC
The Accessibility Checker built into LibreOffice Writer 7.x (added as an experimental feature) check, among other things, whether the document's title property has been filled in. If it is empty, it displays the warning "Document title is not set". However, if the document property contains only white space, the checker remains silent.

Steps to reproduce the issue:

1. Create a new Write document. Optionally, add some text, including a paragraph that uses the Title style.
2. Go to File > Properties > Description, and check that the Title field is empty. (This is actually the default.) Close the dialog.
3. Go to Tools > Accessibility Check. The checker warns that the "Document title is not set". Close the dialog.
4. Go to File > Properties > Description, and add one or more spaces into the Title field. Close the dialog.
5. Go to Tools > Accessibility Check. The checker says nothing about the useless title property.

Note: If the Accessibility Checker is not yet enabled, go to Tools > Options > LibreOffice > Advanced, and check the checkbox "Enable experimental features (may be unstable)".

Expected behaviour: Either issue the same warning as for an empty Title property or something more specific. (Similarly, the checker should also warn when the author has simply entered the file name as the Title property.)


Version: 7.1.4.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5
Locale: en-GB (en_GB.utf8); UI: en-GB
Calc: threaded
Comment 1 Dieter 2022-05-30 20:10:58 UTC
I confirm it with

Version: 7.3.4.1 (x64) / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

I would consider this as a bug => NEW

But let's have a double-check from the design-team

cc: Design-Team
Comment 2 Heiko Tietze 2022-05-31 07:15:30 UTC
Well silence is a pointless title for a reader. So yes, let's trim the white space before checking emptiness. 

Code pointer:
sw/source/core/access/AccessibilityCheck.cxx -> class DocumentTitleCheck
Comment 3 Commit Notification 2022-08-17 08:30:54 UTC
Liu Hao committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149115 Trim the white sapce in title before emptiness check

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 4 Commit Notification 2022-08-17 14:55:07 UTC
Liu Hao committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/658cb77de90ec66abc6d0ed4aba614772ae482bd

tdf#149115 Trim the white sapce in title before emptiness check

It will be available in 7.4.1.

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 Dieter 2022-10-02 14:15:55 UTC
VERIFIED with

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c3b5eea4304ad6815b491f549fce008a9630c213
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Liu Hao, thank you for fixing this issue!