Bug 74121 - ACCESSIBILITY: Accessibility broken on Mac OS X in master
Summary: ACCESSIBILITY: Accessibility broken on Mac OS X in master
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.3.0
Keywords: accessibility
Depends on:
Blocks: a11y-macOS
  Show dependency treegraph
 
Reported: 2014-01-27 17:52 UTC by Niklas Johansson
Modified: 2015-12-18 09:31 UTC (History)
7 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 Niklas Johansson 2014-01-27 17:52:22 UTC
Problem description:
When inspecting accessibility in LibreOffice using Accessibility Inspector you can only see the frame in the accessibility tree.

I'm trying to bisect this to see if I can find at what commit this issue arouse. It might take a few days before I have the results from that though.

Steps to reproduce:
1. Start Accessibility Inspector
2. Start LibreOfficeDev.app
3. Move the mouse over different parts of LibreOffice

Current behavior:
Only the title bar of the frame seems to trigger an update in Accessibility inspector.

Expected behavior:
When you move the cursor over a button for example, the accessibility information of the button should be displayed. Likewise for other objects.
              
Operating System: Mac OS X
Version: 4.3.0.0.alpha0+ Master
Comment 2 Niklas Johansson 2014-01-29 10:11:56 UTC
Adding Bug 74121 - ACCESSIBILITY: Accessibility broken on Mac OS X in master to mac accessibility tracking bug
Comment 3 Niklas Johansson 2014-01-31 11:44:07 UTC
If I understand things correctly this is the commit that broke the build:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=461e0f9eaf9895ecd0eba67b35a4d2cec8a5e5c5

I checked that one out and only applied the patches called Fix fallout from 461e0f9eaf9895ecd0eba67b35a4d2cec8a5e5c5

This made it possible to build again but the accessibility is broken so I suppose there is still something left that needs some adjustment.

Note that I can find the elements, toolbar, menu etc., by navigating the accessibility Hierarchy. The main windows has children as usual so it might be somewhere in the focus tracking.
Comment 4 Niklas Johansson 2014-01-31 14:19:31 UTC
Running Accessibility Verifier on LibreOffice gives a lot of window errors such as:
error: AXButton - "Open", AXWindow (could not find) is not the correct window, should be AXWindow(AXStandardWindow) - "LibreOfficeDev"

These errors where not present before the patch I mention in the previous comment.
Comment 5 Marco Zehe 2014-02-03 20:10:33 UTC
I can confirm this with VoiceOver as well. I found this while testing if bug 74470 happens on Master as well. With VoiceOver on, Master builds freeze completely and have to be shut down via the Mac equivalent of Task manager.
Comment 6 Robinson Tryon (qubit) 2014-02-04 00:21:16 UTC
(In reply to comment #3)
> If I understand things correctly this is the commit that broke the build:
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=461e0f9eaf9895ecd0eba67b35a4d2cec8a5e5c5

Caolán - Please take a look at this commit and see if you can determine what in the patch degraded accessibility on OSX.

Thanks!
Comment 7 Robinson Tryon (qubit) 2014-02-04 00:23:50 UTC
(In reply to comment #4)
> Running Accessibility Verifier on LibreOffice gives a lot of window errors
> such as:
> error: AXButton - "Open", AXWindow (could not find) is not the correct
> window, should be AXWindow(AXStandardWindow) - "LibreOfficeDev"
> 
> These errors where not present before the patch I mention in the previous
> comment.

Hi Niklas,
Please keep track of this change on Windows, and re-test after we've fixed the issues on OSX. It's quite possible that a patch may fix one OS but not the other; if Windows needs additional patches, it would be great for us to be on top of the problem so we may fix things sooner rather than later.

Best,
Comment 8 V Stuart Foote 2014-02-04 01:34:00 UTC
@Robinson,
(In reply to comment #7)
> (In reply to comment #4)
> ...
> Please keep track of this change on Windows, and re-test after we've fixed
> the issues on OSX. 

I don't think Niklas suggested this was in any way associated with MS Windows. AX types are all Apple accessibility functions and this issue is limited to OS X.

Of course it could end up otherwise, we'll watch it across the OS builds, :)
Comment 9 Robinson Tryon (qubit) 2014-02-04 05:19:03 UTC
(In reply to comment #8)
> @Robinson,
> (In reply to comment #7)
> > (In reply to comment #4)
> > ...
> > Please keep track of this change on Windows, and re-test after we've fixed
> > the issues on OSX. 
> 
> I don't think Niklas suggested this was in any way associated with MS
> Windows. AX types are all Apple accessibility functions and this issue is
> limited to OS X.

Ah, verily it is true. (note to self: double-check bug comments when half-asleep...and by double-check, I probably mean triple-check)

> Of course it could end up otherwise, we'll watch it across the OS builds, :)

Indeed, indeed. Thank you for your diligence in this regard!
Comment 10 Niklas Johansson 2014-02-04 09:47:59 UTC
I've found two issues in the original commit and sent a patch for review [1] that fixes the problem with the window errors (see comment 4). Note however that accessibility is still broken on master after my patch. Since Accessibility has been broken on master for Mac for the last two months I'm now building from the commit that broke accessibility and then gradually applying the fixup-patches as well as my patch to see if something else has broken accessibility since or if there is still some loose ends from the mentioned commit.

[1] https://gerrit.libreoffice.org/#/c/7837/
Comment 11 Commit Notification 2014-02-04 11:45:19 UTC
Niklas Johansson committed a patch related to this issue.
It has been pushed to "master":

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

fdo#74121 - Accessibility broken on Mac OS X (master)



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 12 How can I remove my account? 2014-02-04 12:03:41 UTC
The bug was quite interesting, and I had came to the same conclusion as you before I noticed your patch. AOO had "fixed" it to "look" more right but actually the method is expected to return what seems like a "wrong" thing, a NSWindow* even if it declared to return a NSView*... Fun. Thanks!
Comment 13 Niklas Johansson 2014-02-04 14:08:23 UTC
Seems the commit that originally broke accessibility caused even more problems. 

I've finished the build that I mention i comment 10 and it contains the same issues as master, LibreOffice easily freezes with VoiceOver running. What catches my eye is that accessible actions for buttons etc. is no longer reported in Accessibility Inspector so it might be related to that.
Comment 14 Niklas Johansson 2014-02-05 15:56:59 UTC
It seems I was a bit sloppy with my testing, the issue with missing Accessible Actions and a LibreOffice that easily freezes was introduced before the commit
http://cgit.freedesktop.org/libreoffice/core/commit/?id=461e0f9eaf9895ecd0eba67b35a4d2cec8a5e5c5

So I suppose I need to go on and Bisect that issue as well.
Comment 15 Niklas Johansson 2014-02-22 15:23:15 UTC
The issue described in the first comment is no longer true and so I'm closing this as resolved, fixed.

As for comment 14, I opened a new bug [1] for it since it's unrelated of the original issue.

[1] https://www.libreoffice.org/bugzilla/show_bug.cgi?id=74983
Comment 16 Stephan Bergmann 2015-01-22 11:45:16 UTC
(In reply to Niklas Johansson from comment #0)
> Steps to reproduce:
> 1. Start Accessibility Inspector

Any idea how to do that on OS X 10.10?  Where could I find that Accessibility Inspector?
Comment 17 Niklas Johansson 2015-01-22 11:58:27 UTC
Open Xcode and go to the menu Xcode -> Open Developer Tool -> Accessibility Inspector.
I don't really remember if I had to do anything for the Accessibility Inspector to be added to that menu, at least I don't think so.
Comment 18 Stephan Bergmann 2015-01-22 12:08:33 UTC
(In reply to Niklas Johansson from comment #17)
> Open Xcode and go to the menu Xcode -> Open Developer Tool -> Accessibility
> Inspector.

Yes, thanks.
Comment 19 Robinson Tryon (qubit) 2015-12-18 09:31:15 UTC
Migrating Whiteboard tags to Keywords: (a11y -> accessibility)
[NinjaEdit]