summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-27 05:38:42 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-27 05:38:42 +0000
commitf02a93c179d26f4e84af83c0ac16c39a62d1dc3f (patch)
tree4e8316fb431e2fa4aa83961f5bf1ba21f5adffc2
parent6d07f8df39b3ebab23e6a7c10c2ce3f61223ffe6 (diff)
CWS-TOOLING: integrate CWS sw31a11y01
2009-01-09 11:36:08 +0100 ab r266069 : #i97891# NSAccessibilityRoleDescription 2009-01-07 11:01:19 +0100 od r265955 : #i88069# emit accessibility event TEXT_ATTRIBUTE_CHANGED on change of paragraph attributes 2009-01-06 11:50:21 +0100 od r265904 : #i81824# methods <SwWrtShell::_FwdPara()> and <SwWrtShell::_BwdPara()> - avoid unnecessary cursor movements due avoid unnecessary accessibility events.
-rw-r--r--vcl/aqua/source/a11y/aqua11yrolehelper.mm56
1 files changed, 5 insertions, 51 deletions
diff --git a/vcl/aqua/source/a11y/aqua11yrolehelper.mm b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
index cec0064e420f..4bf88d49d04a 100644
--- a/vcl/aqua/source/a11y/aqua11yrolehelper.mm
+++ b/vcl/aqua/source/a11y/aqua11yrolehelper.mm
@@ -264,58 +264,12 @@ using namespace ::com::sun::star::uno;
return nativeSubrole;
}
-// TODO: the role description requires a localized string with a short description of the specific control
-// i.e. "button" if the Role is AccessibleRole::PUSH_BUTTON. the OOo-a11y-API does not have such an attribute
-// possible solution: hard-coded, non localized (english) descriptions (better than nothing, and voiceover
-// reads the text in english pronounciation anyway)
-// Use: NSAccessibilityRoleDescription
+(id)getRoleDescriptionFrom: (NSString *) role with: (NSString *) subRole {
- id roleDescription = @"";
- if ( [ role isEqualToString: NSAccessibilityUnknownRole ] ) {
- roleDescription = @"unknown";
- } else if ( [ role isEqualToString: NSAccessibilityComboBoxRole ] ) {
- roleDescription = @"combo box";
- } else if ( [ role isEqualToString: NSAccessibilityStaticTextRole ] ) {
- roleDescription = @"text";
- } else if ( [ role isEqualToString: NSAccessibilityListRole ] ) {
- roleDescription = @"list";
- } else if ( [ role isEqualToString: NSAccessibilityMenuRole ] ) {
- roleDescription = @"menu";
- } else if ( [ role isEqualToString: NSAccessibilityMenuItemRole ] ) {
- roleDescription = @"menu item";
- } else if ( [ role isEqualToString: NSAccessibilityButtonRole ] ) {
- roleDescription = @"button";
- } else if ( [ role isEqualToString: NSAccessibilityScrollBarRole ] ) {
- roleDescription = @"scroll bar";
- } else if ( [ role isEqualToString: NSAccessibilityScrollAreaRole ] ) {
- roleDescription = @"scroll area";
- } else if ( [ role isEqualToString: NSAccessibilityGroupRole ] ) {
- roleDescription = @"group";
- } else if ( [ role isEqualToString: NSAccessibilityTextAreaRole ] ) {
- roleDescription = @"text entry area";
- } else if ( [ role isEqualToString: NSAccessibilityToolbarRole ] ) {
- roleDescription = @"toolbar";
- } else if ( [ role isEqualToString: NSAccessibilityTableRole ] ) {
- roleDescription = @"table";
- } else if ( [ role isEqualToString: NSAccessibilityTabGroupRole ] ) {
- roleDescription = @"tab group";
- } else if ( [ role isEqualToString: NSAccessibilityCheckBoxRole ] ) {
- roleDescription = @"check box";
- } else if ( [ role isEqualToString: NSAccessibilityRadioGroupRole ] ) {
- roleDescription = @"radio group";
- } else if ( [ role isEqualToString: NSAccessibilityRadioButtonRole ] ) {
- roleDescription = @"radio button";
- } else if ( [ role isEqualToString: NSAccessibilityRowRole ] ) {
- if ( [ subRole isEqualToString: NSAccessibilityOutlineRowSubrole ] ) {
- roleDescription = @"outline row";
- } else if ( [ subRole isEqualToString: NSAccessibilityTableRowSubrole ] ) {
- roleDescription = @"table row";
- }
- } else if ( [ role isEqualToString: NSAccessibilityMenuButtonRole ] ) {
- roleDescription = @"menu button";
- } else if ( [ role isEqualToString: NSAccessibilityPopUpButtonRole ] ) {
- roleDescription = @"popup menu button";
- }
+ id roleDescription;
+ if ( [ subRole length ] == 0 )
+ roleDescription = NSAccessibilityRoleDescription( role, nil );
+ else
+ roleDescription = NSAccessibilityRoleDescription( role, subRole );
return roleDescription;
}