VoiceOver for Accessibility Labels with Localization

Hello! I'm adding VoiceOver support for my app, but I'm having an issue where my accessibility value is not being spoken. I have made a helper class that creates an NSString from a double and converts it to the user's region currency.

CurrencyFormatter.m

+ (NSString *) localizedCurrencyStringFromDouble: (double) value {
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    formatter.numberStyle = NSNumberFormatterCurrencyStyle;
    formatter.locale = [NSLocale currentLocale];
    NSString *currencyString = [formatter stringFromNumber: @(value)];
    [formatter release];
    return currencyString;
}

View Contoller

self.checkTotalLabel.accessibilityLabel = NSLocalizedString(@"Total Amount", @"Accessibility Label for Total");

self.checkTotalLabel.accessibilityValue = [CurrencyFormatter localizedCurrencyStringFromDouble: total];

I'm confused on whether the value should go into the accessibility label or not. When the currency is just USD and the language is English, it's a simple fix. But when the currency needs to be converted, I'm not sure where to go from here.

If anyone has any guidance, it would help me a lot!

Thank you!

I'm a little unclear on the specifics of your question. Are you curious because languages other than English may order words in the sentence differently than in English?

I would also like to learn more about what this UI looks like visually. Is "Total Amount" an actual label in your app, or is this something you're adding only for the accessibility label?

VoiceOver for Accessibility Labels with Localization
 
 
Q