diff --git a/MVMCoreUI/Containers/TabBarController/TopTabbar.m b/MVMCoreUI/Containers/TabBarController/TopTabbar.m index 6828f4a7..fe4dd250 100644 --- a/MVMCoreUI/Containers/TabBarController/TopTabbar.m +++ b/MVMCoreUI/Containers/TabBarController/TopTabbar.m @@ -197,9 +197,9 @@ static NSString * const COLLECTION_CELL_ID = @"cell"; cell.isAccessibilityElement = NO; cell.contentView.isAccessibilityElement = YES; - NSString *accLabel = [title stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTab"]]; + NSString *titleString = [label.text stringByAppendingString:[NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"], self.selectedIndex + 1, [self.datasource numberOfTopTabbarItems:self]]]; + NSString *accLabel = [titleString stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTab"]]; cell.contentView.accessibilityLabel = accLabel; - cell.contentView.accessibilityValue = [NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"],indexPath.row + 1, [self.datasource numberOfTopTabbarItems:self]]; [cell.contentView setAccessibilityHint:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabHint"]]; if (indexPath.row == self.selectedIndex) { @@ -405,16 +405,17 @@ static NSString * const COLLECTION_CELL_ID = @"cell"; [cell layoutIfNeeded]; } - //setup selected tab accessibility - NSString *string = label.text; - NSString *accLabel = [string stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"toptabbar_tab_selected"]]; - cell.contentView.accessibilityLabel = accLabel; - [cell.contentView setAccessibilityHint:nil]; - self.selectedIndex = indexPath.row; if ([self.delegate respondsToSelector:@selector(topTabbar:titleForItemAtIndex:)]){ [self.delegate topTabbar:self didSelectItemAtIndex:indexPath.row]; } + + //setup selected tab accessibility + NSString *string = [label.text stringByAppendingString:[NSString stringWithFormat:[MVMCoreUIUtility hardcodedStringWithKey:@"AccTabIndex"], self.selectedIndex + 1, [self.datasource numberOfTopTabbarItems:self]]]; + NSString *accLabel = [string stringByAppendingString:[MVMCoreUIUtility hardcodedStringWithKey:@"toptabbar_tab_selected"]]; + cell.contentView.accessibilityLabel = accLabel; + [cell.contentView setAccessibilityHint:nil]; + } - (void)reloadData { diff --git a/MVMCoreUI/SupportingFiles/Strings/en.lproj/Localizable.strings b/MVMCoreUI/SupportingFiles/Strings/en.lproj/Localizable.strings index c622ccc4..3132a67a 100644 --- a/MVMCoreUI/SupportingFiles/Strings/en.lproj/Localizable.strings +++ b/MVMCoreUI/SupportingFiles/Strings/en.lproj/Localizable.strings @@ -11,7 +11,7 @@ // Tab "AccTab" = ", tab"; "AccTabHint" = "Double tap to select."; -"AccTabIndex" = "%ld of %ld"; +"AccTabIndex" = ", %ld of %ld"; // top alert "toptabbar_tab_selected" = ", tab, Selected"; "AccTopAlertClosed" = "Top alert notification is closed."; diff --git a/MVMCoreUI/SupportingFiles/Strings/es-MX.lproj/Localizable.strings b/MVMCoreUI/SupportingFiles/Strings/es-MX.lproj/Localizable.strings index fc314f81..f1092f8f 100644 --- a/MVMCoreUI/SupportingFiles/Strings/es-MX.lproj/Localizable.strings +++ b/MVMCoreUI/SupportingFiles/Strings/es-MX.lproj/Localizable.strings @@ -10,7 +10,7 @@ // Tab "AccTab" = ", pestaña"; "AccTabHint" = "Toca dos veces para seleccionar."; -"AccTabIndex" = "%ld de %ld"; +"AccTabIndex" = ", %ld de %ld"; // top alert "toptabbar_tab_selected" = ", pestaña, Seleccionado"; "AccTopAlertClosed" = "La notificación de alerta máxima está desactivada."; diff --git a/MVMCoreUI/SupportingFiles/Strings/es.lproj/Localizable.strings b/MVMCoreUI/SupportingFiles/Strings/es.lproj/Localizable.strings index fc314f81..f1092f8f 100644 --- a/MVMCoreUI/SupportingFiles/Strings/es.lproj/Localizable.strings +++ b/MVMCoreUI/SupportingFiles/Strings/es.lproj/Localizable.strings @@ -10,7 +10,7 @@ // Tab "AccTab" = ", pestaña"; "AccTabHint" = "Toca dos veces para seleccionar."; -"AccTabIndex" = "%ld de %ld"; +"AccTabIndex" = ", %ld de %ld"; // top alert "toptabbar_tab_selected" = ", pestaña, Seleccionado"; "AccTopAlertClosed" = "La notificación de alerta máxima está desactivada.";