Bug 67980

Summary: VoiceOver does not inform about misspelled text
Product: LibreOffice Reporter: Boris Dušek <me>
Component: UIAssignee: Boris Dušek <me>
Status: RESOLVED FIXED    
Severity: normal CC: vsfoote
Priority: medium    
Version: 4.2.0.0.alpha0+ Master   
Hardware: All   
OS: macOS (All)   
Whiteboard: target:4.2.0 target:4.1.2
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 55571    

Description Boris Dušek 2013-08-10 11:35:48 UTC
Summary:
VoiceOver announced bold, italic etc. text in text components (e.g. Writer) but does not announce misspelled text. This is because AXMispelled is not returned as a text attribute.

Steps to reproduce:
1. Open Writer
2. Write some grammatically wrong text (e.g. "asdf asdf asdf asdf this is right fdsa fdsa fdsa fdsa"
3. Put cursor at the beginning of the text (e.g. Cmd+arrow up)
4. Turn on VoiceOver (Cmd+F5)
5.a. Press VO+Cmd+E ("Find Next Misspelled Word")
or
5.b. Move cursor word right (Option-right arrow)
or
5.c. Press VO+T

Actual Results:
a. VoiceOver says "Misspelled word not found"
b. VoiceOver says "asdf"
c. VoiceOver says "12 point Times New Roman"

Expected Results (deduced from TextEdit behavior):
a. VoiceOver says "Misspelled 12 point Times New Roman asdf"
b. VoiceOver says "Misspelled 12 point Times New Roman asdf"
c. VoiceOver says "Misspelled 12 point Times New Roman"

Regression:
Tested with LibreOffice master (39a78087890fb9255a5e47220bac6cfb956fcfe0) on OS X 10.8.4

Notes:
TextEdit as always is a reference app for this and other accessibility features should work.
Comment 1 Boris Dušek 2013-08-10 11:42:41 UTC
Notes:
AXMisspelled (and probably also the undocumented AXMarkedMisspelled) text attributes should be supported for this to work.

There are some comments in the code that UNO accessibility API cannot provide such information, which, if it is still the case, is unfortunate (aqua11ytextattributeswrapper.mm:152). I will try to debug the returned PropertyValue to find if it still does not contain the required info.
Comment 2 V Stuart Foote 2013-08-10 16:07:41 UTC
@Boris,

The UNO Accessibility API roles are here:

cgit.freedesktop.org/libreoffice/core/tree/offapi/com/sun/star/accessibility/AccessibleRole.idl#n25

And the API ref:

http://api.libreoffice.org/docs/common/ref/com/sun/star/accessibility/module-ix.html

UNO Accessibility API originated with an earlier Java Accessibility API, so kind of limited.

It really should be reworked to implement additional roles enabling LibreOffice compliance with the WCAG 2.0 A & AA guidelines for documents (US Sec 509, and EU (EN) 301 549). But that effort will impact all the bridges, NSAccessibility (AX), a11y (ATK) and the upcoming work on an a11y IAccessible2 bridge. 

Meanwhile the NSAccessibility may have to remain incomplete if needed roles and actions are not supported in the UAA.

Stuart
Comment 3 Boris Dušek 2013-08-11 07:30:10 UTC
Hello Stuart,

thanks for the pointers to LO docs, before I used to google the OOo docs for the same topic :-)

w.r.t. misspelled, when debugging other bug I discovered there is a huge load of attributes returned for getDefaultAttributes and getRunAttributes, and I did not find any documentation defining a set of attributes. So if it was the case that the set of attributes is LO specific, or at least LO can supply its own attributes as well, then just passing an attributes informing whether or not the text is misspelled would suffice.

But it looks like Atk is doing something to mark text misspelled for LO on Linux et al., so I might just look there and see how it's done. As a matter of fact, I remember vaguely that Orca indeed does report misspelled on LO on Linux.
Comment 4 Boris Dušek 2013-08-11 14:40:23 UTC
https://gerrit.libreoffice.org/#/c/5351/ :-)
Comment 5 Commit Notification 2013-08-12 08:22:28 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=db0fa92637a1b2edf26da9917c9dce050ebc8a78

fdo#67980 - VoiceOver does not inform about misspelled text



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2013-08-20 13:46:13 UTC
Boris Dušek committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b822f3c09689d3e494df3499caac034838b3f5c6&h=libreoffice-4-1

fdo#67980 - VoiceOver does not inform about misspelled text


It will be available in LibreOffice 4.1.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.