Bug 67943 - ACCESSIBILITY: Issues with tabbed dialogs on macOS
Summary: ACCESSIBILITY: Issues with tabbed dialogs on macOS
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.1.0.3 rc
Hardware: Other macOS (All)
: medium normal
Assignee: Patrick (volunteer)
URL:
Whiteboard: target:25.2.0 target:24.8.0.2 target:...
Keywords: accessibility
Depends on:
Blocks: a11y-macOS
  Show dependency treegraph
 
Reported: 2013-08-09 09:33 UTC by Niklas Johansson
Modified: 2024-07-12 13:21 UTC (History)
4 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 2013-08-09 09:33:13 UTC
There are quite a few accessibility issues with dialogs containing tabs on Mac OS X. 
The accessibility role of the tabs is set as a NSAccessibilityButtonRole. This makes LibreOffice announce tabs as buttons instead of tabs it is not possible to use the VoiceOver cursor to press the tabs (change tabs). 

The VoiceOver Cursor does not read the content of the tabs, you can however read the content with keyboard focus.
Comment 1 Boris Dušek 2013-08-09 19:28:59 UTC
Could you please give some example of such a dialog? I tried 3 of them (right-click text -> Paragraph..., right-click text -> Characters... and File > Properties...) and VoiceOver is consistently crashing on them (crashes then reopens than crashes again in infinite cycle until you dismiss the dialogs).
Comment 2 Boris Dušek 2013-08-09 19:29:55 UTC
Just adding I am trying with LO master and OS X 10.8.4.
Comment 3 Niklas Johansson 2013-08-10 13:40:40 UTC
The three dialogs you mention are all such dialogs. As I mentiond in a mail to you I tried changing the role to NSAccessibilityTabGroupRole which makes it possible to switch tabs and access the controls contained in the tab. But there are some serious issues with text controls that makes VoiceOver behave pretty much as you describe. Moving away from the text field to a checkbox seems to make the flickering stop. 

On Monday I should have access to a computer again and I'll try to take a closer look at this.

In other programs VoiceOver reports this type of tabs as tab x of y.
Comment 4 Niklas Johansson 2013-08-12 11:06:05 UTC
I inspected some other programs and their tabbed dialogs. It seems they use AXRadioButton with AXRoleDescription = "tab".

Another observation is that controls that belong to a tab is children of AXTabGroup. In LibreOffice they are Children of the AXButton (tab).

When a tab is selected in LibreOffice we get the hierarchy
<AXApplication: "LibreOffice">

If not selected we get:
<AXApplication: "LibreOffice">
 <AXWindow: "The name of the dialog">
  <AXTabGroup>
   <AXButton: "The name of the tab">

When the tab is selected it should still have the same hierarchy as when it's not selected.
Comment 5 retired 2014-03-02 10:37:27 UTC
Confirmed:4.2.1.1:OSX

I tired LO > new writer document, File > Properties. Click top row and bottom row and they switch which is total unnative and irritation behavior. Should not happen.

NEW.
Comment 6 Julien Nabet 2014-11-11 14:16:03 UTC
Just for the record:
http://opengrok.libreoffice.org/xref/core/vcl/osx/a11yrolehelper.mm#81

Here's offical Apple api I found:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/index.html#//apple_ref/doc/constant_group/Roles
The problem is the description doesn't give sufficient hints.
So with this:
"NSAccessibilityRoleAttribute. This required attribute identifies the type of the accessibility object. Cocoa defines a large number of role values, such as NSAccessibilityApplicationRole, NSAccessibilityRadioButtonRole, and NSAccessibilityScrollAreaRole. The value of the role attribute is for programmatic identification purposes only (an assistive application will never present the value of the role attribute to a user) and therefore does not need to be localized. See the NSAccessibility protocol description for a list of all the roles defined in Cocoa."
from https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Accessibility/cocoaAXOverview/cocoaAXOverview.html#//apple_ref/doc/uid/20001057-BAJBCJHJ
It's quite difficult to find the good value.

For tab, I took a look too at mozab, https://developer.mozilla.org/en-US/docs/Web/Accessibility/AT-APIs/Gecko/Roles/ROLE_PAGETAB, they use NSAccessibilityGroupRole
Comment 7 QA Administrators 2015-12-20 16:15:40 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-05-22 13:25:27 UTC Comment hidden (obsolete)
Comment 9 eisa01 2017-08-26 18:08:53 UTC
The behaviour described in comment #5 is still present (shifting of the bottom and top row on File -> Properties), so this has probably not improved

Version: 5.4.0.3
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 10 QA Administrators 2019-01-23 03:48:11 UTC Comment hidden (obsolete)
Comment 11 eisa01 2019-02-17 11:18:15 UTC
Looking at this, it seems like the tabs are still announced as buttons in VoiceOver, so I guess this is still present

Version: 6.3.0.0.alpha0+
Build ID: ce2b98580b9f36d6f358bd2c9c027d3d82cb33d7
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-01-30_01:04:02
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 12 Julien Nabet 2019-02-18 09:39:04 UTC
Alex: thought you might have some thoughts here.
Comment 13 Alex Thurgood 2019-02-18 10:23:06 UTC
Hi Julien,

The link you posted previously in comment 6, points to a now deprecated accessibility API. The current API that should be used :

https://developer.apple.com/documentation/appkit/nsaccessibilitytabgrouprole?language=objc

points to a specific tabgroup role, but again, is not particularly helpful.

The subrole page also has a tabButtonSubrole :

https://developer.apple.com/documentation/appkit/nsaccessibilitytabbuttonsubrole?language=objc


See also this discussion here about TextMate, where a similar problem was encountered when using VoiceOver in a tabbed setting:

https://github.com/textmate/bugs/issues/7

Also, it seems that the Chromium project addressed a similar issue here :

https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/vK3ReXKiJi0
Comment 14 QA Administrators 2021-02-18 04:35:25 UTC Comment hidden (obsolete)
Comment 15 eisa01 2021-02-21 20:36:39 UTC
Not really sure if this is present or not. Yes, the items in e.g., paragraph formatting are still buttons, but I'm able to move the focus between them with the Voiceover cursor

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 16 QA Administrators 2023-03-25 03:24:10 UTC Comment hidden (obsolete)
Comment 17 Patrick (volunteer) 2024-06-07 00:12:25 UTC
(In reply to Alex Thurgood from comment #13)
> The link you posted previously in comment 6, points to a now deprecated
> accessibility API. The current API that should be used :
> 
> https://developer.apple.com/documentation/appkit/
> nsaccessibilitytabgrouprole?language=objc
> 
> points to a specific tabgroup role, but again, is not particularly helpful.
> 
> The subrole page also has a tabButtonSubrole :
> 
> https://developer.apple.com/documentation/appkit/
> nsaccessibilitytabbuttonsubrole?language=objc

Thanks for the links! Now that LibreOffice has been using the newer accessibility for a while now, let me see if I can figure out how get the LibreOffice C++ code to use these new accessibility roles.

I will post again when I have any news to report.
Comment 18 Patrick (volunteer) 2024-07-12 00:53:43 UTC
I have submitted a fix for this bug in the following patch. It still needs to be reviewed, but with the patch I see the same announcements for tabs as in Microsoft Excel when I move the VoiceOver cursor to a tab in a tab bar:

https://gerrit.libreoffice.org/c/core/+/170389
Comment 19 Commit Notification 2024-07-12 05:41:52 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "master":

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

tdf#67943 tabs must have radio button role and tab button subrole

It will be available in 25.2.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 20 Patrick (volunteer) 2024-07-12 11:23:20 UTC
I have committed a fix this bug. The fix should be in tomorrow's (13 July 2024) nightly master builds:

https://dev-builds.libreoffice.org/daily/master/current.html

Note for macOS testers: the nightly master builds install in /Applications/LibreOfficeDev.app. These builds are not codesigned like regular LibreOffice releases so you will need to execute the following Terminal command after installation but before you launch /Applications/LibreOfficeDev:

xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Comment 21 Commit Notification 2024-07-12 13:21:02 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/66aaa3850f3a3141f19c398a2efc85fde7969092

tdf#67943 tabs must have radio button role and tab button subrole

It will be available in 24.8.0.2.

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 22 Commit Notification 2024-07-12 13:21:05 UTC
Patrick Luby committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/7ddb515df47af6684fd40add748371144695a888

tdf#67943 tabs must have radio button role and tab button subrole

It will be available in 24.2.6.

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.