From 2b59116e5294f3a79837be5a396cb34339ae3b03 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Thu, 3 Feb 2011 15:59:51 -0800 Subject: [PATCH] Make PackageCell, SourceCell, and SectionCell have reasonable VoiceOver labels. --- MobileCydia.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index ee88c00e..cc005907 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4993,6 +4993,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [self setNeedsDisplay]; } +- (NSString *) accessibilityLabel { + return [NSString stringWithFormat:UCLocalize("COLON_DELIMITED"), name_, description_]; +} + - (void) setPackage:(Package *)package { [self clearPackage]; [package parse]; @@ -5221,6 +5225,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [switch_ setFrame:CGRectMake(frame.size.width - 102, 9, rect.size.width, rect.size.height)]; } +- (NSString *) accessibilityLabel { + return name_; +} + - (void) drawContentRect:(CGRect)rect { bool highlighted(highlighted_ && !editing_); @@ -7447,6 +7455,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } return self; } +- (NSString *) accessibilityLabel { + return label_; +} + - (void) drawContentRect:(CGRect)rect { bool highlighted(highlighted_); float width(rect.size.width); -- 2.45.2