summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/osx/a11yrolehelper.mm6
-rw-r--r--vcl/osx/a11ywrapper.mm9
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 {