diff options
author | Patrick Luby <guibmacdev@gmail.com> | 2024-07-11 20:44:55 -0400 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-07-12 07:41:17 +0200 |
commit | c2061f21b1a88c9692a4e081280ed2c52e0b9141 (patch) | |
tree | eb1f9180c711f9201cb317517e6490e318812794 /vcl | |
parent | 1c892a7729234202e6ce14e116e91786b248835a (diff) |
tdf#67943 tabs must have radio button role and tab button subrole
Also, reimplement -[AquaA11yWrapper tabsAttribute] to return children
for tab bars. This will cause VoiceOver to announce that the currently
selected tab is "X of Y" tabs in the tab bar.
Change-Id: I2c3b890fd445c22842b90d60170a71e4e8aa91ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170389
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/a11yrolehelper.mm | 6 | ||||
-rw-r--r-- | vcl/osx/a11ywrapper.mm | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm index 5b621a74e23a..7a8ef5adcbf6 100644 --- a/vcl/osx/a11yrolehelper.mm +++ b/vcl/osx/a11yrolehelper.mm @@ -83,7 +83,8 @@ using namespace ::com::sun::star::uno; MAP( AccessibleRole::MENU_BAR, NSAccessibilityMenuBarRole ); MAP( AccessibleRole::MENU_ITEM, NSAccessibilityMenuItemRole ); MAP( AccessibleRole::OPTION_PANE, NSAccessibilityUnknownRole ); // FIXME - MAP( AccessibleRole::PAGE_TAB, NSAccessibilityButtonRole ); + // tdf#67943 tabs must have radio button role and tab button subrole + MAP( AccessibleRole::PAGE_TAB, NSAccessibilityRadioButtonRole ); MAP( AccessibleRole::PAGE_TAB_LIST, NSAccessibilityTabGroupRole ); MAP( AccessibleRole::PANEL, NSAccessibilityGroupRole ); MAP( AccessibleRole::PARAGRAPH, NSAccessibilityTextAreaRole ); @@ -220,7 +221,8 @@ using namespace ::com::sun::star::uno; MAP( AccessibleRole::MENU_BAR, @"" ); MAP( AccessibleRole::MENU_ITEM, @"" ); MAP( AccessibleRole::OPTION_PANE, @"" ); - MAP( AccessibleRole::PAGE_TAB, @"" ); + // tdf#67943 tabs must have radio button role and tab button subrole + MAP( AccessibleRole::PAGE_TAB, NSAccessibilityTabButtonSubrole ); MAP( AccessibleRole::PAGE_TAB_LIST, @"" ); MAP( AccessibleRole::PANEL, @"" ); MAP( AccessibleRole::PARAGRAPH, @"" ); diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm index c35f02cdae53..365aa99ca816 100644 --- a/vcl/osx/a11ywrapper.mm +++ b/vcl/osx/a11ywrapper.mm @@ -559,7 +559,14 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { } -(id)tabsAttribute { - return self; // TODO ??? + // Related tdf#67943: return children if this is a tab bar + // This will cause VoiceOver to announce that the currently selected tab + // is "X of Y" tabs in the tab bar. + if ( [ self accessibleContext ] -> getAccessibleRole() == AccessibleRole::PAGE_TAB_LIST ) { + return [ self childrenAttribute ]; + } else { + return nil; + } } -(id)sharedTextUIElementsAttribute { |