Bug 103691 - Change in API needed for language tools to display errors in colour
Summary: Change in API needed for language tools to display errors in colour
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Spell-Checking
  Show dependency treegraph
 
Reported: 2016-11-03 21:48 UTC by Marco A.G.Pinto
Modified: 2017-12-13 19:27 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
How it looks in MS Word 2016 with the new LanguageTool add-on (60.38 KB, image/png)
2017-12-13 19:27 UTC, Marco A.G.Pinto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco A.G.Pinto 2016-11-03 21:48:32 UTC
Could someone improve LibreOffice's API in order for LanguageTool to be able to suggest underlining colours and also change the style of the text (italic)?


"We're limited by the LibreOffice API. It only takes the information of the error position, we cannot specify a color there, neither for the underline nor for the background." (Daniel, LanguageTool)

Thanks!
Comment 1 Aron Budea 2016-11-04 05:25:54 UTC
Could you (or someone from LanguageTool) supply more detailed requirements? Preferably to the level of how exactly they'd like the API to change, and also give reasoning why each of these changes would be important?

I can get behind the idea of being able to specify the color of the underlining (but then I wonder what other implications there might be, with regards to a11y for example), but modification of style seems to be very intrusive to the document.
Comment 2 Heiko Tietze 2016-11-04 12:05:36 UTC
As a side note, using color as primary information is evil as color impaired people may not be able to perceive the information.
Comment 3 Tiago Santos 2016-11-04 20:08:09 UTC
This is the follow up off a forum discussion about this possibility.
http://forum.languagetool.org/t/displaying-errors-in-colour/1031/12

Having the possibility to attribute a color to each category allow the user to identify the type os error and disable it in the settings accordingly. 

In a style and grammar checker, users may wish to follow all grammar advices but may not want to follow controversial style guidelines.
Color coding grammar advice can also apply to distinguish between 'possible mistake' type of rules and 'certain error' type of rules'

This is a very significant usability improvement when reviewing large texts (i.e. think of reviewing big translated texts).

> As a side note, using color as primary information is evil as color impaired
> people may not be able to perceive the information.

Well... 'primary information' and 'evil' are quite strong words, are not they?

Neither the underlined information is primary, nor there is anything evil about using available resources to inform the user.
Should GUIs be discontinued because there are persons with severe visual impairments using computers?
Comment 4 Joel Madero 2016-11-12 16:10:00 UTC Comment hidden (off-topic)
Comment 5 Heiko Tietze 2016-11-13 09:50:02 UTC Comment hidden (off-topic)
Comment 6 Tiago Santos 2016-11-13 18:51:51 UTC
> If devs take accessibility serious they could second the color with text in the tooltip, for instance.

Just to calm any concerns over this request, I will explain further my idea.
A color information input will only plug-ins that use it, not the default pre-bundled features, unless their developers decide to do so.

I do not know if LanguageTool or other plug-ins will implement this like I am envisioning it, but, the color extension should only be applied to extra information. That means, for rules that are set as inactive by default (because they controversial or they were not designed to be 100% accurate) or for rules that can be ignored by the user a significant amount of times. 
A consequence of this is that a user, that does not perceive the new colors, will not lose information. He will just be unable to see the new underlines/information.


*OFFTOPIC*

@Heiko Tietze
I would think about a different solution for users with any degree of color differentiation impairment. 

Create an option in accessibility settings that presets the color and style of the underline when a spelling or grammar error is detected. For example, having a red underline with a dot-line-dot pattern, or other already existing border pattern. 
Notice that this is a totally different enhancement request (that someone else may report). This would fix the already existing problems with this type of impairment as well as cover all the remaining color blindness situations (Protanopia, Tritanopes).
  
@Joel Madero

Many thanks for your timely and well written comment.
Comment 7 Marco A.G.Pinto 2017-12-13 19:27:54 UTC
Created attachment 138429 [details]
How it looks in MS Word 2016 with the new LanguageTool add-on

How it looks in MS Word 2016 with the new LanguageTool add-on