Revision: 13011 http://sourceforge.net/p/skim-app/code/13011 Author: hofman Date: 2022-07-11 16:34:23 +0000 (Mon, 11 Jul 2022) Log Message: ----------- Complete accessibility for side bars
Modified Paths: -------------- trunk/SKMainWindowController.m trunk/de.lproj/Localizable.strings trunk/en.lproj/Localizable.strings trunk/es.lproj/Localizable.strings trunk/fr.lproj/Localizable.strings trunk/it.lproj/Localizable.strings trunk/ja.lproj/Localizable.strings trunk/nl.lproj/Localizable.strings trunk/pl.lproj/Localizable.strings trunk/ru.lproj/Localizable.strings trunk/zh_CN.lproj/Localizable.strings trunk/zh_TW.lproj/Localizable.strings Added Paths: ----------- trunk/SKGroupView.h trunk/SKGroupView.m Added: trunk/SKGroupView.h =================================================================== --- trunk/SKGroupView.h (rev 0) +++ trunk/SKGroupView.h 2022-07-11 16:34:23 UTC (rev 13011) @@ -0,0 +1,44 @@ +// +// SKGroupView.h +// Skim +// +// Created by Christiaan Hofman on 11/07/2022. +/* + This software is Copyright (c) 2022 + Adam Maxwell. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Adam Maxwell nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> + + +@interface SKGroupView : NSView <NSAccessibilityGroup> + +@end Added: trunk/SKGroupView.m =================================================================== --- trunk/SKGroupView.m (rev 0) +++ trunk/SKGroupView.m 2022-07-11 16:34:23 UTC (rev 13011) @@ -0,0 +1,64 @@ +// +// SKGroupView.m +// Skim +// +// Created by Christiaan Hofman on 11/07/2022. +/* + This software is Copyright (c) 2022 + Adam Maxwell. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Adam Maxwell nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SKGroupView.h" +#import "NSView_SKExtensions.h" + +@implementation SKGroupView + +- (BOOL)isAccessibilityElement { + return YES; +} + +- (NSString *)accessibilityRole { + return NSAccessibilityGroupRole; +} + +- (NSString *)accessibilityRoleDescription { + return NSAccessibilityRoleDescription(NSAccessibilityGroupRole, nil); +} + +- (NSRect)accessibilityFrame { + return [self convertRectToScreen:[self bounds]]; +} + +- (id)accessibilityParent { + return NSAccessibilityUnignoredAncestor([self superview]); +} + +@end Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2022-07-11 16:14:04 UTC (rev 13010) +++ trunk/SKMainWindowController.m 2022-07-11 16:34:23 UTC (rev 13011) @@ -375,8 +375,8 @@ [rightSideContentView addSubview:rightSideController.view]; [rightSideController.view activateConstraintsToSuperview]; - [leftSideContentView setAccessibilityLabel:NSLocalizedString(@"Contents Pane", @"")]; - [rightSideContentView setAccessibilityLabel:NSLocalizedString(@"Notes Pane", @"")]; + [leftSideContentView setAccessibilityLabel:NSLocalizedString(@"contents pane", @"Accessibility description")]; + [rightSideContentView setAccessibilityLabel:NSLocalizedString(@"notes pane", @"Accessibility description")]; if (mwcFlags.fullSizeContent) { [leftSideController setCurrentView:[[leftSideController currentView] superview]]; Modified: trunk/de.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/en.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/es.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/fr.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/it.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ja.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/nl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/pl.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/ru.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_CN.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/zh_TW.lproj/Localizable.strings =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit